WiimoteReal: Improve state changes and minor code cleanups.

This commit is contained in:
Jordan Woyak
2019-03-07 18:44:23 -06:00
parent 909e9322e7
commit 49218c32ed
10 changed files with 185 additions and 191 deletions

View File

@ -74,7 +74,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system
static const u32 STATE_VERSION = 104; // Last changed in PR 7806
static const u32 STATE_VERSION = 105; // Last changed in PR 7871
// Maps savestate versions to Dolphin versions.
// Versions after 42 don't need to be added to this list,
@ -177,10 +177,6 @@ static void DoState(PointerWrap& p)
g_video_backend->DoState(p);
p.DoMarker("video_backend");
if (SConfig::GetInstance().bWii)
Wiimote::DoState(p);
p.DoMarker("Wiimote");
PowerPC::DoState(p);
p.DoMarker("PowerPC");
// CoreTiming needs to be restored before restoring Hardware because
@ -189,6 +185,9 @@ static void DoState(PointerWrap& p)
p.DoMarker("CoreTiming");
HW::DoState(p);
p.DoMarker("HW");
if (SConfig::GetInstance().bWii)
Wiimote::DoState(p);
p.DoMarker("Wiimote");
Movie::DoState(p);
p.DoMarker("Movie");
Gecko::DoState(p);