mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00: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:
parent
0fd153f9e1
commit
7526bf76ff
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue