Skip to content

Commit

Permalink
Fix rendering not ending after it failed
Browse files Browse the repository at this point in the history
For instance, when input bindings would fail, the master renderer thread would terminate but the UI would still be in rendering mode with no way to truly abort the render.
  • Loading branch information
dictoon committed Oct 31, 2018
1 parent 036ed02 commit 2a46f63
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,20 @@ namespace
private:
MasterRenderer* m_master_renderer;

// The starting point for the thread.
// The entry point for the thread.
void run() override
{
RENDERER_LOG_DEBUG("master renderer thread has started.");

set_current_thread_name("master_renderer");

const MasterRenderer::RenderingResult rendering_result =
m_master_renderer->render();

if (rendering_result.m_status == MasterRenderer::RenderingResult::Failed)
if (rendering_result.m_status != MasterRenderer::RenderingResult::Succeeded)
emit signal_rendering_failed();

RENDERER_LOG_DEBUG("master renderer thread is ending...");
}
};
}
Expand Down

0 comments on commit 2a46f63

Please sign in to comment.