all repos — mgba @ ad37ae3d61326865a190f4b866800474c30ebadd

mGBA Game Boy Advance Emulator

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
commit

ad37ae3d61326865a190f4b866800474c30ebadd

parent

71458f21409b438c68f2db846266acdce5763a83

1 files changed, 6 insertions(+), 3 deletions(-)

jump to
M src/platform/qt/Window.cppsrc/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(); }