mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-17 08:15:02 +00:00
Fixed #7502
This commit is contained in:
parent
e482dd82b9
commit
7220056974
|
@ -1082,16 +1082,17 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
|
||||||
state != Qt::ApplicationActive) {
|
state != Qt::ApplicationActive) {
|
||||||
LOG_DEBUG(Frontend, "ApplicationState unusual flag: {} ", state);
|
LOG_DEBUG(Frontend, "ApplicationState unusual flag: {} ", state);
|
||||||
}
|
}
|
||||||
if (ui->action_Pause->isEnabled() &&
|
if (emulation_running) {
|
||||||
|
if (emu_thread->IsRunning() &&
|
||||||
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
||||||
auto_paused = true;
|
auto_paused = true;
|
||||||
OnPauseGame();
|
OnPauseGame();
|
||||||
} else if (emulation_running && !emu_thread->IsRunning() && auto_paused &&
|
} else if (!emu_thread->IsRunning() && auto_paused && state == Qt::ApplicationActive) {
|
||||||
state == Qt::ApplicationActive) {
|
|
||||||
auto_paused = false;
|
auto_paused = false;
|
||||||
OnStartGame();
|
OnStartGame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GMainWindow::ConnectWidgetEvents() {
|
void GMainWindow::ConnectWidgetEvents() {
|
||||||
connect(game_list, &GameList::BootGame, this, &GMainWindow::BootGame);
|
connect(game_list, &GameList::BootGame, this, &GMainWindow::BootGame);
|
||||||
|
|
Loading…
Reference in a new issue