mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
rewrite how structures are stored to savestates (store individual fields, to avoid compatibility issues)
also fixes stability issues when 3D is involved. turns out we were storing raw pointers to vertices. figures more crapo code to get around that, but atleast it works without asploding now.
This commit is contained in:
10
src/NDS.cpp
10
src/NDS.cpp
@ -487,7 +487,15 @@ bool DoSavestate(Savestate* file)
|
||||
|
||||
file->Var32(&CPUStop);
|
||||
|
||||
file->VarArray(Timers, 8*sizeof(Timer));
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Timer* timer = &Timers[i];
|
||||
|
||||
file->Var16(&timer->Reload);
|
||||
file->Var16(&timer->Cnt);
|
||||
file->Var32(&timer->Counter);
|
||||
file->Var32(&timer->CycleShift);
|
||||
}
|
||||
file->VarArray(TimerCheckMask, 2*sizeof(u8));
|
||||
|
||||
file->VarArray(DMA9Fill, 4*sizeof(u32));
|
||||
|
Reference in New Issue
Block a user