summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2026-03-29 11:12:22 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2026-03-29 11:23:09 -0500
commit84dd2304d60a47816bee348272b4dc0946dbbfea (patch)
treedb69ae8399eefe55276e4b41744cef1664e3093e /Source/Core
parentde0999a19c164d2055fc5ece338e4ad2208999ca (diff)
HW/GBACore: Allow save states to work when the GBA core is stopped.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/GBACore.cpp12
-rw-r--r--Source/Core/Core/State.cpp2
2 files changed, 9 insertions, 5 deletions
diff --git a/Source/Core/Core/HW/GBACore.cpp b/Source/Core/Core/HW/GBACore.cpp
index 5f2c3ff5b6..d95617b9b3 100644
--- a/Source/Core/Core/HW/GBACore.cpp
+++ b/Source/Core/Core/HW/GBACore.cpp
@@ -650,11 +650,13 @@ void Core::ExportSave(std::string_view save_path)
void Core::DoState(PointerWrap& p)
{
Flush();
- if (!IsStarted())
+
+ bool is_started = IsStarted();
+ p.Do(is_started);
+
+ if (!is_started)
{
- ::Core::DisplayMessage(fmt::format("GBA{} core not started. Aborting.", m_device_number + 1),
- 3000);
- p.SetVerifyMode();
+ Stop();
return;
}
@@ -675,6 +677,8 @@ void Core::DoState(PointerWrap& p)
return;
}
+ Start(0);
+
p.Do(m_video_buffer);
p.Do(m_last_gc_ticks);
p.Do(m_gc_ticks_remainder);
diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp
index b9f655e578..e121dcfb7b 100644
--- a/Source/Core/Core/State.cpp
+++ b/Source/Core/Core/State.cpp
@@ -95,7 +95,7 @@ struct CompressAndDumpStateArgs
static Common::WorkQueueThreadSP<CompressAndDumpStateArgs> s_compress_and_dump_thread;
// Don't forget to increase this after doing changes on the savestate system
-constexpr u32 STATE_VERSION = 184; // Last changed in PR 14110
+constexpr u32 STATE_VERSION = 185; // Last changed in PR 14526
// Increase this if the StateExtendedHeader definition changes
constexpr u32 EXTENDED_HEADER_VERSION = 1; // Last changed in PR 12217