diff --git a/include/utils/App/App.h b/include/utils/App/App.h index 224aefc..5bcc6d6 100644 --- a/include/utils/App/App.h +++ b/include/utils/App/App.h @@ -129,7 +129,6 @@ namespace Archimedes { } if(!handled) { - std::cout << "here?\n"; if(this->onEvent(*events.front())) { Event* e = events.front(); events.pop_front(); diff --git a/modules/ClientModule/src/ClientModule.cpp b/modules/ClientModule/src/ClientModule.cpp index fa067e4..67c36a9 100644 --- a/modules/ClientModule/src/ClientModule.cpp +++ b/modules/ClientModule/src/ClientModule.cpp @@ -125,7 +125,7 @@ bool ClientModule::onEvent(const Archimedes::Event& event) { void ClientModule::pollIncomingData() { - while(running) { + while(running && connection != k_HSteamNetConnection_Invalid) { ISteamNetworkingMessage *pIncomingMsg = nullptr; int numMsgs = interface->ReceiveMessagesOnConnection( connection, &pIncomingMsg, 1 ); if ( numMsgs == 0 ) diff --git a/modules/WindowModule/src/WindowModule.cpp b/modules/WindowModule/src/WindowModule.cpp index 23b9b89..6991a22 100644 --- a/modules/WindowModule/src/WindowModule.cpp +++ b/modules/WindowModule/src/WindowModule.cpp @@ -45,6 +45,8 @@ void WindowModule::run() { if(window) window->doFrame(); + else + app->emitEvent(new Archimedes::DoUnloadModuleEvent(name)); } bool WindowModule::onEvent(const Archimedes::Event& e) { diff --git a/src/example_apps/MinimalApp/MinimalApp.cpp b/src/example_apps/MinimalApp/MinimalApp.cpp index 0f81bc3..36dde6f 100644 --- a/src/example_apps/MinimalApp/MinimalApp.cpp +++ b/src/example_apps/MinimalApp/MinimalApp.cpp @@ -3,7 +3,6 @@ void MinimalApp::run() { for(std::string m : runOrder) { - std::cout << "onLoad: " << m << std::endl; modules[m]->onLoad(); }