Skip to content

Commit

Permalink
Dedicated Server|Fixed: Main loop was not running
Browse files Browse the repository at this point in the history
The loop callback was incorrectly exited immediately in novideo mode.
  • Loading branch information
skyjake committed Apr 10, 2012
1 parent f05a2b5 commit 71f4caa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 3 additions & 5 deletions doomsday/engine/portable/src/dd_loop.c
Expand Up @@ -116,8 +116,6 @@ int DD_GameLoop(void)

void DD_GameLoopCallback(void)
{
if(novideo) return; // Only after the frame has been drawn, please.

if(Sys_IsShuttingDown())
return; // Shouldn't run this while shutting down.

Expand All @@ -132,11 +130,11 @@ void DD_GameLoopCallback(void)
// Update clients at regular intervals.
Sv_TransmitFrame();

// Request update of window contents.
Window_Draw(Window_Main());

if(!novideo)
{
// Request update of window contents.
Window_Draw(Window_Main());

GL_ProcessDeferredTasks(FRAME_DEFERRED_UPLOAD_TIMEOUT);
}

Expand Down
6 changes: 6 additions & 0 deletions doomsday/libdeng2/src/legacy/legacycore.cpp
Expand Up @@ -127,6 +127,12 @@ void LegacyCore::popLoop()
d->loopStack.removeLast();

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

if(d->loop.func)
{
// Start the periodic callback calls.
QTimer::singleShot(d->loop.interval, this, SLOT(callback()));
}
}

int LegacyCore::runEventLoop()
Expand Down

0 comments on commit 71f4caa

Please sign in to comment.