mirror of https://github.com/mgba-emu/mgba.git
Ensure savestate window closes when a game is shut down
This commit is contained in:
parent
e2812b30b2
commit
2c74cb46ab
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue