Only unpause after savestate window if the game was not previously paused
Jeffrey Pfau jeffrey@endrift.com
Wed, 15 Oct 2014 23:09:50 -0700
1 files changed,
6 insertions(+),
3 deletions(-)
jump to
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -148,11 +148,14 @@ }
} void Window::openStateWindow(LoadSave ls) { - m_controller->setPaused(true); + bool wasPaused = m_controller->isPaused(); LoadSaveState* window = new LoadSaveState(m_controller); + connect(this, SIGNAL(shutdown()), window, SLOT(hide())); + if (!wasPaused) { + m_controller->setPaused(true); + connect(window, &LoadSaveState::closed, [this]() { m_controller->setPaused(false); }); + } window->setAttribute(Qt::WA_DeleteOnClose); - connect(this, SIGNAL(shutdown()), window, SLOT(hide())); - connect(window, &LoadSaveState::closed, [this]() { m_controller->setPaused(false); }); window->setMode(ls); window->show(); }