Slight changes to update mgba to 0.4.0
This commit is contained in:
parent
8aa298c95b
commit
86a8c1dfd4
|
@ -59,6 +59,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
||||||
[DllImport(dll, CallingConvention = cc)]
|
[DllImport(dll, CallingConvention = cc)]
|
||||||
public static extern void BizGetState(IntPtr ctx, byte[] dest);
|
public static extern void BizGetState(IntPtr ctx, byte[] dest);
|
||||||
[DllImport(dll, CallingConvention = cc)]
|
[DllImport(dll, CallingConvention = cc)]
|
||||||
public static extern void BizPutState(IntPtr ctx, byte[] src);
|
public static extern bool BizPutState(IntPtr ctx, byte[] src);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ using System.ComponentModel;
|
||||||
|
|
||||||
namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
||||||
{
|
{
|
||||||
[CoreAttributes("mGBA", "endrift", true, true, "0.2.0", "https://mgba.io/", false)]
|
[CoreAttributes("mGBA", "endrift", true, true, "0.4.0", "https://mgba.io/", false)]
|
||||||
[ServiceNotApplicable(typeof(IDriveLight), typeof(IRegionable))]
|
[ServiceNotApplicable(typeof(IDriveLight), typeof(IRegionable))]
|
||||||
public class MGBAHawk : IEmulator, IVideoProvider, ISyncSoundProvider, IGBAGPUViewable, ISaveRam, IStatable, IInputPollable, ISettable<object, MGBAHawk.SyncSettings>
|
public class MGBAHawk : IEmulator, IVideoProvider, ISyncSoundProvider, IGBAGPUViewable, ISaveRam, IStatable, IInputPollable, ISettable<object, MGBAHawk.SyncSettings>
|
||||||
{
|
{
|
||||||
|
@ -350,7 +350,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
||||||
if (length != savebuff.Length)
|
if (length != savebuff.Length)
|
||||||
throw new InvalidOperationException("Save buffer size mismatch!");
|
throw new InvalidOperationException("Save buffer size mismatch!");
|
||||||
reader.Read(savebuff, 0, length);
|
reader.Read(savebuff, 0, length);
|
||||||
LibmGBA.BizPutState(core, savebuff);
|
if (!LibmGBA.BizPutState(core, savebuff))
|
||||||
|
throw new InvalidOperationException("Core rejected the savestate!");
|
||||||
|
|
||||||
// other variables
|
// other variables
|
||||||
IsLagFrame = reader.ReadBoolean();
|
IsLagFrame = reader.ReadBoolean();
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue