diff --git a/src/citra_qt/configuration/config.cpp b/src/citra_qt/configuration/config.cpp index d139a89e9..d815c99f5 100644 --- a/src/citra_qt/configuration/config.cpp +++ b/src/citra_qt/configuration/config.cpp @@ -57,7 +57,7 @@ const std::array, Settings::NativeAnalog::NumAnalogs> Config: // This must be in alphabetical order according to action name as it must have the same order as // UISetting::values.shortcuts, which is alphabetically ordered. // clang-format off -const std::array default_hotkeys{ +const std::array default_hotkeys{ {{QStringLiteral("Advance Frame"), QStringLiteral("Main Window"), {QStringLiteral("\\"), Qt::ApplicationShortcut}}, {QStringLiteral("Capture Screenshot"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+P"), Qt::ApplicationShortcut}}, {QStringLiteral("Continue/Pause Emulation"), QStringLiteral("Main Window"), {QStringLiteral("F4"), Qt::WindowShortcut}}, @@ -73,6 +73,8 @@ const std::array default_hotkeys{ {QStringLiteral("Rotate Screens Upright"), QStringLiteral("Main Window"), {QStringLiteral("F8"), Qt::WindowShortcut}}, {QStringLiteral("Stop Emulation"), QStringLiteral("Main Window"), {QStringLiteral("F5"), Qt::WindowShortcut}}, {QStringLiteral("Swap Screens"), QStringLiteral("Main Window"), {QStringLiteral("F9"), Qt::WindowShortcut}}, + {QStringLiteral("Save to Oldest Slot"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+C"), Qt::WindowShortcut}}, + {QStringLiteral("Load from Newest Slot"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+V"), Qt::WindowShortcut}}, {QStringLiteral("Toggle Filter Bar"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+F"), Qt::WindowShortcut}}, {QStringLiteral("Toggle Frame Advancing"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+A"), Qt::ApplicationShortcut}}, {QStringLiteral("Toggle Screen Layout"), QStringLiteral("Main Window"), {QStringLiteral("F10"), Qt::WindowShortcut}}, diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index a583e903a..0ef1e5bb1 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -524,6 +524,10 @@ void GMainWindow::InitializeHotkeys() { OnCaptureScreenshot(); } }); + connect(hotkey_registry.GetHotkey(main_window, ui.action_Load_from_Newest_Slot->text(), this), + &QShortcut::activated, ui.action_Load_from_Newest_Slot, &QAction::trigger); + connect(hotkey_registry.GetHotkey(main_window, ui.action_Save_to_Oldest_Slot->text(), this), + &QShortcut::activated, ui.action_Save_to_Oldest_Slot, &QAction::trigger); } void GMainWindow::ShowUpdaterWidgets() { @@ -1636,7 +1640,7 @@ void GMainWindow::OnSaveState() { assert(action); Core::System::GetInstance().SendSignal(Core::System::Signal::Save, action->data().toUInt()); - UpdateSaveStates(); + newest_slot = action->data().toUInt(); } void GMainWindow::OnLoadState() { diff --git a/src/core/core.cpp b/src/core/core.cpp index fa6d0c30d..3d915b764 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -577,7 +577,9 @@ void System::serialize(Archive& ar, const unsigned int file_version) { ar&* memory.get(); ar&* kernel.get(); VideoCore::serialize(ar, file_version); - ar& Movie::GetInstance(); + if (file_version >= 1) { + ar& Movie::GetInstance(); + } // This needs to be set from somewhere - might as well be here! if (Archive::is_loading::value) { diff --git a/src/core/core.h b/src/core/core.h index 9fe98f723..ee66ff5bf 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -7,6 +7,7 @@ #include #include #include +#include #include "common/common_types.h" #include "core/custom_tex_cache.h" #include "core/frontend/applets/mii_selector.h" @@ -401,3 +402,5 @@ inline AudioCore::DspInterface& DSP() { } } // namespace Core + +BOOST_CLASS_VERSION(Core::System, 1)