add some missing IPC HLE data to savestates
This commit is contained in:
parent
c9059c708e
commit
19b0b02ad7
|
@ -575,3 +575,12 @@ void UpdateDevices()
|
||||||
|
|
||||||
|
|
||||||
} // end of namespace WII_IPC_HLE_Interface
|
} // end of namespace WII_IPC_HLE_Interface
|
||||||
|
|
||||||
|
// TODO: create WII_IPC_HLE_Device.cpp ?
|
||||||
|
void IWII_IPC_HLE_Device::DoStateShared(PointerWrap& p)
|
||||||
|
{
|
||||||
|
p.Do(m_Name);
|
||||||
|
p.Do(m_DeviceID);
|
||||||
|
p.Do(m_Hardware);
|
||||||
|
p.Do(m_Active);
|
||||||
|
}
|
||||||
|
|
|
@ -62,7 +62,9 @@ public:
|
||||||
|
|
||||||
virtual ~IWII_IPC_HLE_Device() { }
|
virtual ~IWII_IPC_HLE_Device() { }
|
||||||
|
|
||||||
virtual void DoState(PointerWrap&) { }
|
virtual void DoState(PointerWrap& p) { DoStateShared(p); }
|
||||||
|
|
||||||
|
void DoStateShared(PointerWrap& p);
|
||||||
|
|
||||||
const std::string& GetDeviceName() const { return m_Name; }
|
const std::string& GetDeviceName() const { return m_Name; }
|
||||||
u32 GetDeviceID() const { return m_DeviceID; }
|
u32 GetDeviceID() const { return m_DeviceID; }
|
||||||
|
|
|
@ -363,7 +363,30 @@ bool CWII_IPC_HLE_Device_FileIO::IOCtl(u32 _CommandAddress)
|
||||||
|
|
||||||
void CWII_IPC_HLE_Device_FileIO::DoState(PointerWrap &p)
|
void CWII_IPC_HLE_Device_FileIO::DoState(PointerWrap &p)
|
||||||
{
|
{
|
||||||
|
DoStateShared(p);
|
||||||
|
|
||||||
|
bool have_file_handle = (m_pFileHandle != 0);
|
||||||
|
s32 seek = (have_file_handle) ? (s32)m_pFileHandle.Tell() : 0;
|
||||||
|
|
||||||
|
p.Do(have_file_handle);
|
||||||
p.Do(m_Mode);
|
p.Do(m_Mode);
|
||||||
p.Do(m_SeekPos);
|
p.Do(seek);
|
||||||
p.Do(m_Filename);
|
|
||||||
|
if (p.GetMode() == PointerWrap::MODE_READ)
|
||||||
|
{
|
||||||
|
int mode = m_Mode;
|
||||||
|
bool active = m_Active;
|
||||||
|
if (have_file_handle)
|
||||||
|
{
|
||||||
|
Open(0, m_Mode);
|
||||||
|
_dbg_assert_msg_(WII_IPC_HLE, m_pFileHandle, "bad filehandle");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Close(0, true);
|
||||||
|
m_Mode = mode;
|
||||||
|
m_Active = active;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (have_file_handle)
|
||||||
|
m_pFileHandle.Seek(seek, SEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
|
@ -501,6 +501,8 @@ s32 CWII_IPC_HLE_Device_fs::ExecuteCommand(u32 _Parameter, u32 _BufferIn, u32 _B
|
||||||
|
|
||||||
void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
|
void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
|
||||||
{
|
{
|
||||||
|
DoStateShared(p);
|
||||||
|
|
||||||
// handle /tmp
|
// handle /tmp
|
||||||
|
|
||||||
std::string Path = File::GetUserPath(D_WIIUSER_IDX) + "tmp";
|
std::string Path = File::GetUserPath(D_WIIUSER_IDX) + "tmp";
|
||||||
|
|
|
@ -186,6 +186,8 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::DoState(PointerWrap &p)
|
||||||
m_WiiMotes.pop_back();
|
m_WiiMotes.pop_back();
|
||||||
p.DoMarker("m_WiiMotes");
|
p.DoMarker("m_WiiMotes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DoStateShared(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CWII_IPC_HLE_Device_usb_oh1_57e_305::RemoteDisconnect(u16 _connectionHandle)
|
bool CWII_IPC_HLE_Device_usb_oh1_57e_305::RemoteDisconnect(u16 _connectionHandle)
|
||||||
|
|
Loading…
Reference in New Issue