mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-20 01:15:08 -05:00
HW/GBACore: Allow save states to work when the GBA core is stopped.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user