diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 7fd5953315..44085b581d 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -523,7 +523,7 @@ public: void DoState(PointerWrap &p) override { - auto s = p.Section("Thread", 1, 4); + auto s = p.Section("Thread", 1, 5); if (!s) return; @@ -553,6 +553,8 @@ public: context.other[4] = context.other[5]; context.other[3] = context.other[4]; } + if (s <= 4) + std::swap(context.hi, context.lo); p.Do(callbacks); diff --git a/Core/HLE/sceKernelThread.h b/Core/HLE/sceKernelThread.h index 3fb082a837..74ec6cd19e 100644 --- a/Core/HLE/sceKernelThread.h +++ b/Core/HLE/sceKernelThread.h @@ -138,8 +138,8 @@ struct ThreadContext struct { u32 pc; - u32 hi; u32 lo; + u32 hi; u32 fcr31; u32 fpcond; diff --git a/Core/MIPS/MIPS.cpp b/Core/MIPS/MIPS.cpp index dc12919eb1..dba64a7b53 100644 --- a/Core/MIPS/MIPS.cpp +++ b/Core/MIPS/MIPS.cpp @@ -289,6 +289,7 @@ void MIPSState::DoState(PointerWrap &p) { p.Do(pc); p.Do(nextPC); p.Do(downcount); + // Reversed, but we can just leave it that way. p.Do(hi); p.Do(lo); p.Do(fpcond); diff --git a/Core/MIPS/MIPS.h b/Core/MIPS/MIPS.h index c4298555e5..f8ec7e25a9 100644 --- a/Core/MIPS/MIPS.h +++ b/Core/MIPS/MIPS.h @@ -174,8 +174,8 @@ public: struct { u32 pc; - u32 hi; u32 lo; + u32 hi; u32 fcr31; //fpu control register u32 fpcond; // cache the cond flag of fcr31 (& 1 << 23)