WindowModule should unload when no window exists during run
This commit is contained in:
@@ -129,7 +129,6 @@ namespace Archimedes {
|
||||
}
|
||||
|
||||
if(!handled) {
|
||||
std::cout << "here?\n";
|
||||
if(this->onEvent(*events.front())) {
|
||||
Event* e = events.front();
|
||||
events.pop_front();
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
void MinimalApp::run() {
|
||||
|
||||
for(std::string m : runOrder) {
|
||||
std::cout << "onLoad: " << m << std::endl;
|
||||
modules[m]->onLoad();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user