Skip to content

Commit

Permalink
Refactor|libappfw|Client: Control timer loop from BaseWindow during draw
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Feb 14, 2014
1 parent c4bfa45 commit a383e75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion doomsday/client/src/clientapp.cpp
Expand Up @@ -450,8 +450,10 @@ void ClientApp::postFrame()

S_EndFrame();

// This is a good time to recycle unneeded memory allocations, as we're just
// finished and shown a frame and there might be free time before we have to
// begin drawing the next frame.
Garbage_Recycle();
loop().resume();
}

void ClientApp::alert(String const &msg, LogEntry::Level level)
Expand Down
5 changes: 4 additions & 1 deletion doomsday/libappfw/src/basewindow.cpp
Expand Up @@ -150,6 +150,9 @@ void BaseWindow::preDraw()
{}

void BaseWindow::postDraw()
{}
{
// The timer loop was paused when the frame was requested to be drawn.
DENG2_GUI_APP->loop().resume();
}

} // namespace de

0 comments on commit a383e75

Please sign in to comment.