Ensure savestate window closes when a game is shut down

This commit is contained in:
Jeffrey Pfau 2014-10-18 04:12:44 -07:00
parent e2812b30b2
commit 2c74cb46ab
1 changed files with 1 additions and 0 deletions

View File

@ -220,6 +220,7 @@ void Window::openStateWindow(LoadSave ls) {
bool wasPaused = m_controller->isPaused();
m_stateWindow = new LoadSaveState(m_controller);
connect(this, SIGNAL(shutdown()), m_stateWindow, SLOT(hide()));
connect(m_controller, SIGNAL(gameStopped(GBAThread*)), m_stateWindow, SLOT(hide()));
connect(m_stateWindow, &LoadSaveState::closed, [this]() {
m_screenWidget->layout()->removeWidget(m_stateWindow);
m_stateWindow = nullptr;