Wiimote: simplify DoState() parameters
This commit is contained in:
parent
ba20f114eb
commit
ae999cb43c
|
@ -70,7 +70,6 @@ public:
|
||||||
|
|
||||||
void SetMode(Mode mode_) { mode = mode_; }
|
void SetMode(Mode mode_) { mode = mode_; }
|
||||||
Mode GetMode() const { return mode; }
|
Mode GetMode() const { return mode; }
|
||||||
u8** GetPPtr() { return ptr; }
|
|
||||||
|
|
||||||
template <typename K, class V>
|
template <typename K, class V>
|
||||||
void Do(std::map<K, V>& x)
|
void Do(std::map<K, V>& x)
|
||||||
|
|
|
@ -153,11 +153,10 @@ unsigned int GetAttached()
|
||||||
// input/output: ptr: [Description Needed]
|
// input/output: ptr: [Description Needed]
|
||||||
// input: mode [Description needed]
|
// input: mode [Description needed]
|
||||||
//
|
//
|
||||||
void DoState(u8 **ptr, PointerWrap::Mode mode)
|
void DoState(PointerWrap& p)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
|
|
||||||
PointerWrap p(ptr, mode);
|
|
||||||
for (unsigned int i=0; i<MAX_BBMOTES; ++i)
|
for (unsigned int i=0; i<MAX_BBMOTES; ++i)
|
||||||
((WiimoteEmu::Wiimote*)s_config.controllers[i])->DoState(p);
|
((WiimoteEmu::Wiimote*)s_config.controllers[i])->DoState(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ void Resume();
|
||||||
void Pause();
|
void Pause();
|
||||||
|
|
||||||
unsigned int GetAttached();
|
unsigned int GetAttached();
|
||||||
void DoState(u8 **ptr, PointerWrap::Mode mode);
|
void DoState(PointerWrap& p);
|
||||||
void EmuStateChange(EMUSTATE_CHANGE newState);
|
void EmuStateChange(EMUSTATE_CHANGE newState);
|
||||||
InputConfig* GetConfig();
|
InputConfig* GetConfig();
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ static std::string DoState(PointerWrap& p)
|
||||||
p.DoMarker("video_backend");
|
p.DoMarker("video_backend");
|
||||||
|
|
||||||
if (SConfig::GetInstance().bWii)
|
if (SConfig::GetInstance().bWii)
|
||||||
Wiimote::DoState(p.GetPPtr(), p.GetMode());
|
Wiimote::DoState(p);
|
||||||
p.DoMarker("Wiimote");
|
p.DoMarker("Wiimote");
|
||||||
|
|
||||||
PowerPC::DoState(p);
|
PowerPC::DoState(p);
|
||||||
|
|
Loading…
Reference in New Issue