N64: Dirty hack to allow savestates to be loaded during the first or second frame of emulation.
This commit is contained in:
parent
ff0d3c4beb
commit
9cc5a00076
|
@ -708,6 +708,16 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
|
||||||
|
|
||||||
public void LoadState(byte[] buffer)
|
public void LoadState(byte[] buffer)
|
||||||
{
|
{
|
||||||
|
// This is a dirty hack...
|
||||||
|
// When using the dynamic recompiler if a state is loaded too early some pointers are not set up yet, so mupen
|
||||||
|
// tries to access null pointers and the emulator crashes. It seems like it takes 2 frames to fully set up the recompiler,
|
||||||
|
// so if two frames haven't been run yet, run them, then load the state.
|
||||||
|
if (bizhawkCore.Frame < 2)
|
||||||
|
{
|
||||||
|
frame_advance();
|
||||||
|
frame_advance();
|
||||||
|
}
|
||||||
|
|
||||||
m64pCoreLoadState(buffer);
|
m64pCoreLoadState(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue