From ae999cb43c1a9c3ba7807e7a08d4554aab0dcbec Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Thu, 1 Oct 2015 08:48:32 +0200 Subject: [PATCH] Wiimote: simplify DoState() parameters --- Source/Core/Common/ChunkFile.h | 1 - Source/Core/Core/HW/Wiimote.cpp | 3 +-- Source/Core/Core/HW/Wiimote.h | 2 +- Source/Core/Core/State.cpp | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/Core/Common/ChunkFile.h b/Source/Core/Common/ChunkFile.h index 5f83c6604f..8ea4e3175f 100644 --- a/Source/Core/Common/ChunkFile.h +++ b/Source/Core/Common/ChunkFile.h @@ -70,7 +70,6 @@ public: void SetMode(Mode mode_) { mode = mode_; } Mode GetMode() const { return mode; } - u8** GetPPtr() { return ptr; } template void Do(std::map& x) diff --git a/Source/Core/Core/HW/Wiimote.cpp b/Source/Core/Core/HW/Wiimote.cpp index 2c6cc4ec8d..2fafd852c6 100644 --- a/Source/Core/Core/HW/Wiimote.cpp +++ b/Source/Core/Core/HW/Wiimote.cpp @@ -153,11 +153,10 @@ unsigned int GetAttached() // input/output: ptr: [Description Needed] // input: mode [Description needed] // -void DoState(u8 **ptr, PointerWrap::Mode mode) +void DoState(PointerWrap& p) { // TODO: - PointerWrap p(ptr, mode); for (unsigned int i=0; iDoState(p); } diff --git a/Source/Core/Core/HW/Wiimote.h b/Source/Core/Core/HW/Wiimote.h index 051d7cc3e8..3bf03457ad 100644 --- a/Source/Core/Core/HW/Wiimote.h +++ b/Source/Core/Core/HW/Wiimote.h @@ -42,7 +42,7 @@ void Resume(); void Pause(); unsigned int GetAttached(); -void DoState(u8 **ptr, PointerWrap::Mode mode); +void DoState(PointerWrap& p); void EmuStateChange(EMUSTATE_CHANGE newState); InputConfig* GetConfig(); diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index 129aaa15ea..a1895ed1ea 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -164,7 +164,7 @@ static std::string DoState(PointerWrap& p) p.DoMarker("video_backend"); if (SConfig::GetInstance().bWii) - Wiimote::DoState(p.GetPPtr(), p.GetMode()); + Wiimote::DoState(p); p.DoMarker("Wiimote"); PowerPC::DoState(p);