mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 18:30:05 +00:00
Pause in background guard clause and unused flag
This commit is contained in:
parent
66b1e419c3
commit
05b1cfc63b
@ -32,7 +32,7 @@
|
|||||||
<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 on background</string>
|
<string>Pause emulation when in background</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -500,10 +500,11 @@ void GMainWindow::RestoreUIState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
|
void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
|
||||||
if (UISettings::values.pause_when_in_background) {
|
if (!UISettings::values.pause_when_in_background) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (ui.action_Pause->isEnabled() &&
|
if (ui.action_Pause->isEnabled() &&
|
||||||
(state == Qt::ApplicationSuspended ||
|
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
||||||
state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
|
||||||
auto_paused = true;
|
auto_paused = true;
|
||||||
OnPauseGame();
|
OnPauseGame();
|
||||||
}
|
}
|
||||||
@ -512,7 +513,6 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
|
|||||||
OnStartGame();
|
OnStartGame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void GMainWindow::ConnectWidgetEvents() {
|
void GMainWindow::ConnectWidgetEvents() {
|
||||||
connect(game_list, &GameList::GameChosen, this, &GMainWindow::OnGameListLoadFile);
|
connect(game_list, &GameList::GameChosen, this, &GMainWindow::OnGameListLoadFile);
|
||||||
|
Loading…
Reference in New Issue
Block a user