Only auto unpause when auto paused
This commit is contained in:
parent
23405b4ce1
commit
7224ec57f6
@ -503,9 +503,11 @@ void GMainWindow::OnLoseFocus(Qt::ApplicationState state) {
|
|||||||
if (ui.action_Pause->isEnabled() &&
|
if (ui.action_Pause->isEnabled() &&
|
||||||
(state == Qt::ApplicationSuspended ||
|
(state == Qt::ApplicationSuspended ||
|
||||||
state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
|
||||||
|
auto_paused = true;
|
||||||
OnPauseGame();
|
OnPauseGame();
|
||||||
}
|
}
|
||||||
if (ui.action_Start->isEnabled() && state == Qt::ApplicationActive) {
|
if (ui.action_Start->isEnabled() && auto_paused && state == Qt::ApplicationActive) {
|
||||||
|
auto_paused = false;
|
||||||
OnStartGame();
|
OnStartGame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,6 +233,8 @@ private:
|
|||||||
// The path to the game currently running
|
// The path to the game currently running
|
||||||
QString game_path;
|
QString game_path;
|
||||||
|
|
||||||
|
bool auto_paused = false;
|
||||||
|
|
||||||
// Movie
|
// Movie
|
||||||
bool movie_record_on_start = false;
|
bool movie_record_on_start = false;
|
||||||
QString movie_record_path;
|
QString movie_record_path;
|
||||||
|
Loading…
Reference in New Issue
Block a user