Use async logging while streaming only
The benefits of reliable output outweigh performance concerns during non-streaming activities.
This commit is contained in:
parent
b1232e0ed4
commit
bd6235efba
4 changed files with 49 additions and 2 deletions
|
|
@ -2014,6 +2014,9 @@ void Session::execInternal()
|
|||
// Toggle the stats overlay if requested by the user
|
||||
m_OverlayManager.setOverlayState(Overlay::OverlayDebug, m_Preferences->showPerformanceOverlay);
|
||||
|
||||
// Switch to async logging mode when we enter the SDL loop
|
||||
StreamUtils::enterAsyncLoggingMode();
|
||||
|
||||
// Hijack this thread to be the SDL main thread. We have to do this
|
||||
// because we want to suspend all Qt processing until the stream is over.
|
||||
SDL_Event event;
|
||||
|
|
@ -2363,6 +2366,9 @@ void Session::execInternal()
|
|||
}
|
||||
|
||||
DispatchDeferredCleanup:
|
||||
// Switch back to synchronous logging mode
|
||||
StreamUtils::exitAsyncLoggingMode();
|
||||
|
||||
// Uncapture the mouse and hide the window immediately,
|
||||
// so we can return to the Qt GUI ASAP.
|
||||
m_InputHandler->setCaptureActive(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue