From 2b2fd4217ef9adc774329485530214c5c9bfffd1 Mon Sep 17 00:00:00 2001 From: Fabrice CARUSO Date: Mon, 25 Sep 2023 17:18:56 +0200 Subject: [PATCH] SaveStates: Fix MainWindow.m_state_slot is not restored from Qt.ini Emulation/StateSlot. Select slot 2 and exit & launch Dolphin again. Slot 2 is selected in the menu, but saving from selected slot saves to slot 1. --- Source/Core/DolphinQt/MainWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 5e9bc67896..3e9596f72e 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -280,6 +280,9 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters, } } + m_state_slot = + std::clamp(Settings::Instance().GetStateSlot(), 1, static_cast(State::NUM_STATES)); + QSettings& settings = Settings::GetQSettings(); restoreState(settings.value(QStringLiteral("mainwindow/state")).toByteArray());