提交 4ff7ac0b 编写于 作者: J jp9000

UI: Change output blocking bool to integer ref counter

上级 0697e37b
......@@ -3958,7 +3958,7 @@ void OBSBasic::StartStreaming()
{
if (outputHandler->StreamingActive())
return;
if (!enableOutputs)
if (disableOutputsRef)
return;
if (api)
......@@ -4250,7 +4250,7 @@ void OBSBasic::StartRecording()
{
if (outputHandler->RecordingActive())
return;
if (!enableOutputs)
if (disableOutputsRef)
return;
if (api)
......@@ -4352,7 +4352,7 @@ void OBSBasic::StartReplayBuffer()
return;
if (outputHandler->ReplayBufferActive())
return;
if (!enableOutputs)
if (disableOutputsRef)
return;
obs_output_t *output = outputHandler->replayBuffer;
......
......@@ -318,7 +318,7 @@ private:
int programCX = 0, programCY = 0;
float programScale = 0.0f;
bool enableOutputs = true;
int disableOutputsRef = 0;
inline bool IsPreviewProgramMode() const
{
......@@ -501,7 +501,12 @@ public:
inline void EnableOutputs(bool enable)
{
enableOutputs = enable;
if (enable) {
if (--disableOutputsRef < 0)
disableOutputsRef = 0;
} else {
disableOutputsRef++;
}
}
void ReorderSceneItem(obs_sceneitem_t *item, size_t idx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册