Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #12201 from fabricecaruso/master
SaveStates : Fix MainWindow.m_state_slot is not restored from Qt.ini Emulation/StateSlot.
  • Loading branch information
AdmiralCurtiss committed Sep 28, 2023
2 parents 5b68449 + 2b2fd42 commit 45c8597
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/Core/DolphinQt/MainWindow.cpp
Expand Up @@ -280,6 +280,9 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters,
}
}

m_state_slot =
std::clamp(Settings::Instance().GetStateSlot(), 1, static_cast<int>(State::NUM_STATES));

QSettings& settings = Settings::GetQSettings();

restoreState(settings.value(QStringLiteral("mainwindow/state")).toByteArray());
Expand Down

0 comments on commit 45c8597

Please sign in to comment.