Merge pull request #2192 from Programatic/pause_fix

UI: Fix wrong icon if recording stopped while paused
This commit is contained in:
Jim 2019-11-23 00:46:35 -08:00 committed by GitHub
commit db9bc163b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5087,6 +5087,9 @@ inline void OBSBasic::OnActivate()
}
}
extern volatile bool recording_paused;
extern volatile bool replaybuf_active;
inline void OBSBasic::OnDeactivate()
{
if (!outputHandler->Active() && !ui->profileMenu->isEnabled()) {
@ -5098,8 +5101,10 @@ inline void OBSBasic::OnDeactivate()
if (trayIcon)
trayIcon->setIcon(QIcon::fromTheme(
"obs-tray", QIcon(":/res/images/obs.png")));
} else {
if (trayIcon)
} else if (trayIcon) {
if (os_atomic_load_bool(&recording_paused))
trayIcon->setIcon(QIcon(":/res/images/obs_paused.png"));
else
trayIcon->setIcon(
QIcon(":/res/images/tray_active.png"));
}
@ -5507,9 +5512,6 @@ void OBSBasic::RecordingStop(int code, QString last_error)
#define RP_NO_HOTKEY_TITLE QTStr("Output.ReplayBuffer.NoHotkey.Title")
#define RP_NO_HOTKEY_TEXT QTStr("Output.ReplayBuffer.NoHotkey.Msg")
extern volatile bool recording_paused;
extern volatile bool replaybuf_active;
void OBSBasic::ShowReplayBufferPauseWarning()
{
auto msgBox = []() {