Skip to content

Commit

Permalink
Debug|Client: Removed an unnecessary assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jun 11, 2016
1 parent 02dc905 commit 67c5834
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions doomsday/apps/client/src/busyrunner.cpp
Expand Up @@ -81,14 +81,14 @@ DENG2_PIMPL_NOREF(BusyRunner)

void busyModeWillBegin(BusyTask &firstTask)
{
if(auto *fader = ClientWindow::main().contentFade())
if (auto *fader = ClientWindow::main().contentFade())
{
fader->cancel();
}

// Are we doing a transition effect?
busyWillAnimateTransition = animatedTransitionActive(firstTask.mode);
if(busyWillAnimateTransition)
if (busyWillAnimateTransition)
{
Con_TransitionConfigure();
}
Expand Down Expand Up @@ -120,7 +120,7 @@ DENG2_PIMPL_NOREF(BusyRunner)
void busyTaskWillStart(BusyTask &task)
{
// Is the worker updating its progress?
if(task.maxProgress > 0)
if (task.maxProgress > 0)
{
Con_InitProgress2(task.maxProgress, task.progressStart, task.progressEnd);
}
Expand All @@ -134,7 +134,6 @@ DENG2_PIMPL_NOREF(BusyRunner)
{
DENG_ASSERT_IN_MAIN_THREAD();
DENG_ASSERT(eventLoop);
DENG_ASSERT(busyThread);

busyDone = true;

Expand All @@ -144,7 +143,7 @@ DENG2_PIMPL_NOREF(BusyRunner)

eventLoop->exit(result);

if(fadeFromBlack)
if (fadeFromBlack)
{
ClientWindow::main().fadeContentFromBlack(2);
}
Expand All @@ -170,7 +169,7 @@ static void busyWorkerTerminated(systhreadexitstatus_t status)
{
DENG_ASSERT(busy().isActive());

if(status == DENG_THREAD_STOPPED_WITH_EXCEPTION)
if (status == DENG_THREAD_STOPPED_WITH_EXCEPTION)
{
busy().abort("Uncaught exception from busy thread");
}
Expand Down Expand Up @@ -207,13 +206,13 @@ BusyRunner::Result BusyRunner::runTask(BusyTask *task)
d->eventLoop = nullptr;

// Teardown.
if(d->busyWillAnimateTransition)
if (d->busyWillAnimateTransition)
{
Con_TransitionBegin();
}

// Make sure that any remaining deferred content gets uploaded.
if(!(task->mode & BUSYF_NO_UPLOADS))
if (!(task->mode & BUSYF_NO_UPLOADS))
{
GL_ProcessDeferredTasks(0);
}
Expand All @@ -229,23 +228,23 @@ bool BusyRunner::isTransitionAnimated() const
void BusyRunner::loop()
{
BusyTask *const busyTask = busy().currentTask();
if(!busyTask || !busy().isActive()) return;
if (!busyTask || !busy().isActive()) return;

bool const canUpload = !(busyTask->mode & BUSYF_NO_UPLOADS);

// Post and discard all input events.
ClientApp::inputSystem().processEvents(0);
ClientApp::inputSystem().processSharpEvents(0);

if(canUpload)
if (canUpload)
{
ClientWindow::main().glActivate();

// Any deferred content needs to get uploaded.
GL_ProcessDeferredTasks(15);
}

if(!d->busyDone ||
if (!d->busyDone ||
(canUpload && GL_DeferredTaskCount() > 0) ||
!Con_IsProgressAnimationCompleted())
{
Expand All @@ -269,7 +268,7 @@ void BusyMode_Loop()

bool BusyRunner::isWorkerThread(uint threadId) const
{
if(!busy().isActive() || !d->busyThread) return false;
if (!busy().isActive() || !d->busyThread) return false;

return (Sys_ThreadId(d->busyThread) == threadId);
}
Expand All @@ -283,7 +282,7 @@ bool BusyRunner::inWorkerThread() const
void BusyMode_FreezeGameForBusyMode(void)
{
// This is only possible from the main thread.
if(ClientWindow::mainExists() &&
if (ClientWindow::mainExists() &&
DoomsdayApp::app().busyMode().taskRunner() &&
de::App::inMainThread())
{
Expand Down

0 comments on commit 67c5834

Please sign in to comment.