Skip to content

Commit

Permalink
LegacyCore: Force loop resuming after pop
Browse files Browse the repository at this point in the history
When returning to an earlier loop context, make sure the loop continues
running again. For example, when returning from busy mode.
  • Loading branch information
skyjake committed Apr 27, 2012
1 parent 703bd66 commit 48a044e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions doomsday/libdeng2/src/legacy/legacycore.cpp
Expand Up @@ -142,10 +142,8 @@ void LegacyCore::popLoop()

LOG_DEBUG("Loop function popped, now %p.") << dintptr(d->loop.func);

if(!d->loop.paused)
{
resumeLoop();
}
d->loop.paused = true; // Force resume.
resumeLoop();
}

void LegacyCore::pauseLoop()
Expand All @@ -163,8 +161,6 @@ void LegacyCore::resumeLoop()
d->loop.paused = false;
if(d->loop.func)
{
DENG2_ASSERT(!d->loopTimer->isActive());

// Start the periodic callback calls.
d->loopTimer->start(d->loop.interval);
}
Expand Down

0 comments on commit 48a044e

Please sign in to comment.