diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj index e03d40e43a..0c2b4018a4 100644 --- a/Source/Core/Core/Core.vcxproj +++ b/Source/Core/Core/Core.vcxproj @@ -385,7 +385,11 @@ - + + false + false + false + Create Create diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp index 03b1d3b75b..bc50269037 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp @@ -193,7 +193,8 @@ bool CUCode_AXWii::AXTask(u32& _uMail) case 0x0004: // PBs are here now m_addressPBs = HLEMemory_Read_U32(uAddress); - soundStream->GetMixer()->SetHLEReady(true); + if (soundStream) + soundStream->GetMixer()->SetHLEReady(true); // soundStream->Update(); uAddress += 4; break; diff --git a/Source/Core/Core/Src/HW/Wiimote.cpp b/Source/Core/Core/Src/HW/Wiimote.cpp index 30ab7af141..0928deffb1 100644 --- a/Source/Core/Core/Src/HW/Wiimote.cpp +++ b/Source/Core/Core/Src/HW/Wiimote.cpp @@ -136,9 +136,9 @@ void DoState(unsigned char **ptr, int mode) { // TODO: - //PointerWrap p(ptr, mode); - //for (unsigned int i=0; i<4; ++i) - // ((WiimoteEmu::Wiimote*)g_plugin.controllers[i])->DoState(p); + PointerWrap p(ptr, mode); + for (unsigned int i=0; i<4; ++i) + ((WiimoteEmu::Wiimote*)g_plugin.controllers[i])->DoState(p); } // ___________________________________________________________________________ diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp index e7036c8fcb..5a994d859e 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp @@ -601,6 +601,71 @@ void Wiimote::DoState(PointerWrap& p) // Reset(); // should cause a status report to be sent, then wii should re-setup wiimote //} //p.Do(m_reporting_channel); + + //TODO: save to minimize + p.Do(m_extension->active_extension); + p.Do(m_extension->switch_extension); + + p.Do(m_accel); + p.Do(m_index); + p.Do(ir_sin); + p.Do(ir_cos); + p.Do(m_rumble_on); + p.Do(m_speaker_mute); + p.Do(m_motion_plus_present); + p.Do(m_motion_plus_active); + p.Do(m_reporting_auto); + p.Do(m_reporting_mode); + p.Do(m_reporting_channel); + p.Do(m_shake_step); + p.Do(m_sensor_bar_on_top); + p.Do(m_status); + p.Do(m_adpcm_state); + p.Do(m_ext_key); + p.Do(m_eeprom); + p.Do(m_reg_motion_plus); + p.Do(m_reg_ir); + p.Do(m_reg_ext); + p.Do(m_reg_speaker); + + //Do 'm_read_requests' queue + { + u32 size; + if (p.mode == PointerWrap::MODE_READ) + { + //clear + while (m_read_requests.size()) + m_read_requests.pop(); + + p.Do(size); + while (size--) + { + ReadRequest tmp; + p.Do(tmp.address); + p.Do(tmp.position); + p.Do(tmp.size); + tmp.data = new u8[tmp.size]; + p.DoArray(tmp.data, tmp.size); + m_read_requests.push(tmp); + } + } + else + { + std::queue tmp_queue(m_read_requests); + size = m_read_requests.size(); + p.Do(size); + while (!tmp_queue.empty()) + { + ReadRequest tmp = tmp_queue.front(); + p.Do(tmp.address); + p.Do(tmp.position); + p.Do(tmp.size); + p.DoArray(tmp.data, tmp.size); + tmp_queue.pop(); + } + } + } + p.DoMarker("Wiimote"); } } diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h index c124bb4448..4eb4a3e554 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h @@ -62,7 +62,11 @@ public: virtual ~IWII_IPC_HLE_Device() { } - virtual void DoState(PointerWrap& p) { DoStateShared(p); } + virtual void DoState(PointerWrap& p) + { + DoStateShared(p); + p.Do(m_Active); + } void DoStateShared(PointerWrap& p); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp index d53d1ebd2a..0b6de9b4f6 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp @@ -112,6 +112,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::DoState(PointerWrap &p) std::deque m_EventQueue; */ + p.Do(m_ControllerBD); p.Do(m_CtrlSetup); p.Do(m_ACLSetup); p.Do(m_HCIEndpoint); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp index 8445eeffdc..e59e1b3208 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp @@ -102,6 +102,7 @@ void CWII_IPC_HLE_WiiMote::DoState(PointerWrap &p) p.Do(uclass); p.Do(features); p.Do(lmp_version); + p.Do(lmp_subversion); p.Do(m_LinkKey); p.Do(m_Name); diff --git a/Source/Core/VideoCommon/VideoCommon.vcxproj b/Source/Core/VideoCommon/VideoCommon.vcxproj index 0869f33ff4..bf9122e6b5 100644 --- a/Source/Core/VideoCommon/VideoCommon.vcxproj +++ b/Source/Core/VideoCommon/VideoCommon.vcxproj @@ -111,7 +111,8 @@ ..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories) - + false + true @@ -129,7 +130,7 @@ ..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories) - true + false true @@ -141,7 +142,8 @@ ..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories) - + false + true true