mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
Uber-fast stop (thanks to smart memory card flushing) and various savestate changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3659 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3ddbb094ab
commit
06b65ea425
10 changed files with 83 additions and 18 deletions
|
@ -509,9 +509,37 @@ void Initialize()
|
|||
// ================
|
||||
|
||||
|
||||
void DoState(void* ptr, int mode)
|
||||
void DoState(PointerWrap &p)
|
||||
{
|
||||
//TODO: implement
|
||||
return;
|
||||
// TODO: Shorten the list
|
||||
p.Do(g_Leds);
|
||||
//p.Do(g_Speaker);
|
||||
//p.Do(g_SpeakerVoice);
|
||||
p.Do(g_IR);
|
||||
p.DoArray(g_Eeprom, WIIMOTE_EEPROM_SIZE);
|
||||
p.DoArray(g_RegSpeaker, WIIMOTE_REG_SPEAKER_SIZE);
|
||||
p.DoArray(g_RegExt, WIIMOTE_REG_EXT_SIZE);
|
||||
p.DoArray(g_RegExtTmp, WIIMOTE_REG_EXT_SIZE);
|
||||
p.DoArray(g_RegIr, WIIMOTE_REG_IR_SIZE);
|
||||
|
||||
p.Do(g_ReportingMode);
|
||||
p.Do(g_ReportingChannel);
|
||||
|
||||
p.Do(AckDelay);
|
||||
|
||||
p.Do(g_ExtKey);
|
||||
p.Do(g_Encryption);
|
||||
|
||||
p.Do(NumPads);
|
||||
p.Do(NumGoodPads);
|
||||
p.Do(joyinfo);
|
||||
p.DoArray(PadState, 4);
|
||||
p.DoArray(PadMapping, 4);
|
||||
|
||||
p.Do(g_Wm);
|
||||
p.Do(g_Nc);
|
||||
p.Do(g_Cc);
|
||||
}
|
||||
|
||||
/* This is not needed if we call FreeLibrary() when we stop a game, but if it's not called we need to reset
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "wiimote_hid.h"
|
||||
#include "EmuDefinitions.h"
|
||||
#include "ChunkFile.h"
|
||||
|
||||
namespace WiiMoteEmu
|
||||
{
|
||||
|
@ -35,7 +36,7 @@ void GetMousePos(float& x, float& y);
|
|||
|
||||
// General functions
|
||||
void Initialize();
|
||||
void DoState(void* ptr, int mode);
|
||||
void DoState(PointerWrap &p);
|
||||
void Shutdown(void);
|
||||
void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size);
|
||||
void ControlChannel(u16 _channelID, const void* _pData, u32 _Size) ;
|
||||
|
|
|
@ -266,10 +266,28 @@ void Shutdown(void)
|
|||
|
||||
void DoState(unsigned char **ptr, int mode)
|
||||
{
|
||||
PointerWrap p(ptr, mode);
|
||||
|
||||
return;
|
||||
|
||||
// TODO: Shorten the list
|
||||
//p.Do(g_EmulatorRunning);
|
||||
//p.Do(g_ISOId);
|
||||
p.Do(g_FrameOpen);
|
||||
p.Do(g_RealWiiMotePresent);
|
||||
p.Do(g_RealWiiMoteInitialized);
|
||||
p.Do(g_EmulatedWiiMoteInitialized);
|
||||
p.Do(g_WiimoteUnexpectedDisconnect);
|
||||
p.Do(g_UpdateCounter);
|
||||
p.Do(g_UpdateTime);
|
||||
p.Do(g_UpdateRate);
|
||||
p.Do(g_UpdateWriteScreen);
|
||||
p.Do(g_UpdateTimeList);
|
||||
|
||||
#if HAVE_WIIUSE
|
||||
WiiMoteReal::DoState(ptr, mode);
|
||||
WiiMoteReal::DoState(p);
|
||||
#endif
|
||||
WiiMoteEmu::DoState(ptr, mode);
|
||||
WiiMoteEmu::DoState(p);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -400,7 +400,10 @@ int Initialize()
|
|||
return g_NumberOfWiiMotes;
|
||||
}
|
||||
|
||||
void DoState(void* ptr, int mode) {}
|
||||
void DoState(PointerWrap &p)
|
||||
{
|
||||
//TODO: Implement
|
||||
}
|
||||
|
||||
void Shutdown(void)
|
||||
{
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
// Includes
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
#include "wiiuse.h"
|
||||
#include "ChunkFile.h"
|
||||
///////////////////////////////////
|
||||
|
||||
|
||||
|
@ -33,7 +34,7 @@ namespace WiiMoteReal
|
|||
#define MAX_WIIMOTES 1
|
||||
|
||||
int Initialize();
|
||||
void DoState(void* ptr, int mode);
|
||||
void DoState(PointerWrap &p);
|
||||
void Shutdown(void);
|
||||
void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size);
|
||||
void ControlChannel(u16 _channelID, const void* _pData, u32 _Size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue