mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
UI: Fix param logic of ResetHotkeyState calls
The parameter "inFocus" was being given the opposite of what the name implies: it was being set to false when in focus, and true when not in focus. This fixes that confusion.
This commit is contained in:
parent
9ca1e85f7d
commit
985772d915
|
@ -1257,13 +1257,13 @@ static bool StartupOBS(const char *locale, profiler_name_store_t *store)
|
|||
|
||||
inline void OBSApp::ResetHotkeyState(bool inFocus)
|
||||
{
|
||||
obs_hotkey_enable_background_press(inFocus || enableHotkeysInFocus);
|
||||
obs_hotkey_enable_background_press(!inFocus || enableHotkeysInFocus);
|
||||
}
|
||||
|
||||
void OBSApp::EnableInFocusHotkeys(bool enable)
|
||||
{
|
||||
enableHotkeysInFocus = enable;
|
||||
ResetHotkeyState(applicationState() != Qt::ApplicationActive);
|
||||
ResetHotkeyState(applicationState() == Qt::ApplicationActive);
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(VoidFunc)
|
||||
|
@ -1313,9 +1313,9 @@ bool OBSApp::OBSInit()
|
|||
|
||||
connect(this, &QGuiApplication::applicationStateChanged,
|
||||
[this](Qt::ApplicationState state) {
|
||||
ResetHotkeyState(state != Qt::ApplicationActive);
|
||||
ResetHotkeyState(state == Qt::ApplicationActive);
|
||||
});
|
||||
ResetHotkeyState(applicationState() != Qt::ApplicationActive);
|
||||
ResetHotkeyState(applicationState() == Qt::ApplicationActive);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue