SPU2-X: Savestates work now. :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@518 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-02-17 12:05:23 +00:00
parent 09bb31aaa4
commit 5219075e3c
2 changed files with 7 additions and 4 deletions

View File

@ -108,7 +108,7 @@ s32 __fastcall FreezeIt( SPU2freezeData& spud )
} }
} }
//printf( " * SPU2 > FreezeSave > Saved %d cache blocks.\n", blksSaved++ ); printf( " * SPU2 > FreezeSave > Saved %d cache blocks.\n", blksSaved++ );
return 0; return 0;
} }
@ -201,7 +201,7 @@ s32 __fastcall SizeIt()
for( int bidx=0; bidx<pcm_BlockCount; bidx++ ) for( int bidx=0; bidx<pcm_BlockCount; bidx++ )
{ {
if( pcm_cache_data[bidx].Validated ) if( pcm_cache_data[bidx].Validated )
size += pcm_DecodedSamplesPerBlock*sizeof(PcmCacheEntry); size += sizeof(PcmCacheEntry);
} }
return size; return size;
} }
@ -213,7 +213,10 @@ using namespace Savestate;
EXPORT_C_(s32) SPU2freeze(int mode, freezeData *data) EXPORT_C_(s32) SPU2freeze(int mode, freezeData *data)
{ {
if( mode == FREEZE_SIZE ) if( mode == FREEZE_SIZE )
return SizeIt(); {
data->size = SizeIt();
return 0;
}
jASSUME( mode == FREEZE_LOAD || mode == FREEZE_SAVE ); jASSUME( mode == FREEZE_LOAD || mode == FREEZE_SAVE );
jASSUME( data != NULL ); jASSUME( data != NULL );

View File

@ -1051,7 +1051,7 @@
> >
</File> </File>
<File <File
RelativePath="..\SaveState.cpp" RelativePath="..\SaveStateSPU.cpp"
> >
</File> </File>
</Filter> </Filter>