From ec31c7e5bfe1a8fea7f6baff64a474336d945c4a Mon Sep 17 00:00:00 2001 From: Aleks Todorov Date: Thu, 29 Feb 2024 20:46:07 +0000 Subject: [PATCH] UI: Set recording paused before anything else When this call was first introduced in eab10d48b2, it was at top of this block, albeit after the calls to `pause`. Over time it has slowly shifted lower and lower in the block. In reality, it should be the first thing in the block to ensure that further calls have accurate information about the pause state to update themselves. --- UI/window-basic-main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index e3e03023a..16e074046 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -10719,6 +10719,8 @@ void OBSBasic::PauseRecording() obs_output_t *output = outputHandler->fileOutput; if (obs_output_pause(output, true)) { + os_atomic_set_bool(&recording_paused, true); + pause->setAccessibleName(QTStr("Basic.Main.UnpauseRecording")); pause->setToolTip(QTStr("Basic.Main.UnpauseRecording")); pause->blockSignals(true); @@ -10741,8 +10743,6 @@ void OBSBasic::PauseRecording() trayIconFile)); } - os_atomic_set_bool(&recording_paused, true); - auto replay = replayBufferButton ? replayBufferButton->second() : nullptr; if (replay) @@ -10765,6 +10765,8 @@ void OBSBasic::UnpauseRecording() obs_output_t *output = outputHandler->fileOutput; if (obs_output_pause(output, false)) { + os_atomic_set_bool(&recording_paused, false); + pause->setAccessibleName(QTStr("Basic.Main.PauseRecording")); pause->setToolTip(QTStr("Basic.Main.PauseRecording")); pause->blockSignals(true); @@ -10787,8 +10789,6 @@ void OBSBasic::UnpauseRecording() trayIconFile)); } - os_atomic_set_bool(&recording_paused, false); - auto replay = replayBufferButton ? replayBufferButton->second() : nullptr; if (replay)