mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-22 17:00:04 +00:00
small changes to ApplicationState handling, just in case
This commit is contained in:
parent
05b1cfc63b
commit
8d8bc8fee7
@ -29,7 +29,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="toggle_background_pause">
|
<widget class="QCheckBox" name="toggle_background_pause">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pause emulation when in background</string>
|
<string>Pause emulation when in background</string>
|
||||||
|
@ -503,12 +503,15 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
|
|||||||
if (!UISettings::values.pause_when_in_background) {
|
if (!UISettings::values.pause_when_in_background) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (state != Qt::ApplicationHidden && state != Qt::ApplicationInactive &&
|
||||||
|
state != Qt::ApplicationActive) {
|
||||||
|
LOG_DEBUG(Frontend, "ApplicationState unusual flag: {} ", state);
|
||||||
|
}
|
||||||
if (ui.action_Pause->isEnabled() &&
|
if (ui.action_Pause->isEnabled() &&
|
||||||
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
||||||
auto_paused = true;
|
auto_paused = true;
|
||||||
OnPauseGame();
|
OnPauseGame();
|
||||||
}
|
} else if (ui.action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) {
|
||||||
if (ui.action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) {
|
|
||||||
auto_paused = false;
|
auto_paused = false;
|
||||||
OnStartGame();
|
OnStartGame();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user