Merge pull request #12201 from fabricecaruso/master

SaveStates : Fix MainWindow.m_state_slot is not restored from Qt.ini Emulation/StateSlot.
This commit is contained in:
Admiral H. Curtiss 2023-09-28 05:30:48 +02:00 committed by GitHub
commit 45c8597082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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());