소스 검색

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.
Aleks Todorov 1 년 전
부모
커밋
ec31c7e5bf
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      UI/window-basic-main.cpp

+ 4 - 4
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)