update mgba, saveram still broken
This commit is contained in:
parent
609b01408b
commit
a76226fcc2
|
@ -80,7 +80,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
public static extern void BizGetMemoryAreas(IntPtr ctx, [Out]MemoryAreas dst);
|
||||
|
||||
[DllImport(dll, CallingConvention = cc)]
|
||||
public static extern int BizGetSaveRam(IntPtr ctx, byte[] dest);
|
||||
public static extern int BizGetSaveRam(IntPtr ctx, byte[] dest, int maxsize);
|
||||
[DllImport(dll, CallingConvention = cc)]
|
||||
public static extern bool BizPutSaveRam(IntPtr ctx, byte[] src, int size);
|
||||
|
||||
|
|
|
@ -317,7 +317,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
|
||||
public byte[] CloneSaveRam()
|
||||
{
|
||||
int len = LibmGBA.BizGetSaveRam(_core, _saveScratch);
|
||||
int len = LibmGBA.BizGetSaveRam(_core, _saveScratch, _saveScratch.Length);
|
||||
if (len == _saveScratch.Length)
|
||||
throw new InvalidOperationException("Save buffer not long enough");
|
||||
if (len == 0)
|
||||
return null;
|
||||
|
||||
|
@ -362,7 +364,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
{
|
||||
get
|
||||
{
|
||||
return LibmGBA.BizGetSaveRam(_core, _saveScratch) > 0;
|
||||
return LibmGBA.BizGetSaveRam(_core, _saveScratch, _saveScratch.Length) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue