more statesave bugfixes...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@387 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-08-30 16:24:45 +00:00
parent 4608333a56
commit e4825be7a8
7 changed files with 14 additions and 5 deletions

View File

@ -220,7 +220,7 @@ static u8 g_SIBuffer[128];
void DoState(PointerWrap &p)
{
p.Do(g_Channel);
// p.DoArray(g_Channel);
p.Do(g_Poll);
p.Do(g_ComCSR);
p.Do(g_StatusReg);

View File

@ -93,7 +93,7 @@ int CSIDevice_GCController::RunBuffer(u8* _pBuffer, int _iLength)
{
// read the command
EBufferCommands command = static_cast<EBufferCommands>(_pBuffer[iPosition ^ 3]);
iPosition ++;
iPosition++;
// handle it
switch(command)

View File

@ -38,10 +38,11 @@ static std::string cur_filename;
void DoState(PointerWrap &p)
{
// Begin with video plugin, so that it gets a chance to clear it's caches and writeback modified things to RAM
PluginVideo::Video_DoState(p.GetPPtr(), p.GetMode());
PowerPC::DoState(p);
HW::DoState(p);
CoreTiming::DoState(p);
// PluginVideo::Video_DoState(p.GetPPtr(), p.GetMode());
}
void SaveStateCallback(u64 userdata, int cyclesLate)

View File

@ -33,7 +33,7 @@ static int size = 0;
static int readptr = 0;
void Fifo_DoState(PointerWrap &p) {
p.DoArray(videoBuffer, size);
p.DoArray(videoBuffer, FIFO_SIZE);
p.Do(size);
p.Do(readptr);
}

View File

@ -24,6 +24,7 @@
#include "Fifo.h"
static void DoState(PointerWrap &p) {
// BP Memory
p.Do(bpmem);
// CP Memory

View File

@ -152,7 +152,7 @@ void DllConfig(HWND _hParent)
void Video_Initialize(SVideoInitialize* _pVideoInitialize)
{
if( _pVideoInitialize == NULL )
if (_pVideoInitialize == NULL)
return;
frameCount = 0;
@ -167,6 +167,9 @@ void Video_Initialize(SVideoInitialize* _pVideoInitialize)
}
void Video_DoState(unsigned char **ptr, int mode) {
// Clear all caches
TextureCache::Invalidate();
PointerWrap p(ptr, mode);
VideoCommon_DoState(p);
//PanicAlert("Saving/Loading state from DirectX9");

View File

@ -180,6 +180,10 @@ void Video_Initialize(SVideoInitialize* _pVideoInitialize)
}
void Video_DoState(unsigned char **ptr, int mode) {
// Clear all caches
TextureMngr::Invalidate();
PointerWrap p(ptr, mode);
VideoCommon_DoState(p);
//PanicAlert("Saving/Loading state from OpenGL");