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 statemaster
parent
0fd153f9e1
commit
7526bf76ff
|
@ -8965,7 +8965,8 @@ void OBSBasic::UpdatePatronJson(const QString &text, const QString &error)
|
||||||
|
|
||||||
void OBSBasic::PauseRecording()
|
void OBSBasic::PauseRecording()
|
||||||
{
|
{
|
||||||
if (!pause || !outputHandler || !outputHandler->fileOutput)
|
if (!pause || !outputHandler || !outputHandler->fileOutput ||
|
||||||
|
os_atomic_load_bool(&recording_paused))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
obs_output_t *output = outputHandler->fileOutput;
|
obs_output_t *output = outputHandler->fileOutput;
|
||||||
|
@ -9004,7 +9005,8 @@ void OBSBasic::PauseRecording()
|
||||||
|
|
||||||
void OBSBasic::UnpauseRecording()
|
void OBSBasic::UnpauseRecording()
|
||||||
{
|
{
|
||||||
if (!pause || !outputHandler || !outputHandler->fileOutput)
|
if (!pause || !outputHandler || !outputHandler->fileOutput ||
|
||||||
|
!os_atomic_load_bool(&recording_paused))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
obs_output_t *output = outputHandler->fileOutput;
|
obs_output_t *output = outputHandler->fileOutput;
|
||||||
|
|
Loading…
Reference in New Issue