mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-06 07:36:12 -05:00
UI: Check if recording is paused when trying to pause
Adds a safety check to the pause-functions, double-checking that they won't be called whether it is already in the desired state
This commit is contained in:
@@ -8965,7 +8965,8 @@ void OBSBasic::UpdatePatronJson(const QString &text, const QString &error)
|
||||
|
||||
void OBSBasic::PauseRecording()
|
||||
{
|
||||
if (!pause || !outputHandler || !outputHandler->fileOutput)
|
||||
if (!pause || !outputHandler || !outputHandler->fileOutput ||
|
||||
os_atomic_load_bool(&recording_paused))
|
||||
return;
|
||||
|
||||
obs_output_t *output = outputHandler->fileOutput;
|
||||
@@ -9004,7 +9005,8 @@ void OBSBasic::PauseRecording()
|
||||
|
||||
void OBSBasic::UnpauseRecording()
|
||||
{
|
||||
if (!pause || !outputHandler || !outputHandler->fileOutput)
|
||||
if (!pause || !outputHandler || !outputHandler->fileOutput ||
|
||||
!os_atomic_load_bool(&recording_paused))
|
||||
return;
|
||||
|
||||
obs_output_t *output = outputHandler->fileOutput;
|
||||
|
||||
Reference in New Issue
Block a user