* fix https://github.com/TASVideos/BizHawk/issues/2805 * fix https://github.com/TASVideos/BizHawk/issues/2805 for real this time * misc * advance penguin
This commit is contained in:
parent
b5639f8834
commit
d513c5b2a0
Binary file not shown.
Binary file not shown.
|
@ -180,6 +180,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
[BizImport(cc, Compatibility = true)]
|
||||
public abstract byte BizReadBus(IntPtr ctx, uint addr);
|
||||
|
||||
[UnmanagedFunctionPointer(cc)]
|
||||
public delegate void InputCallback();
|
||||
[BizImport(cc, Compatibility = true)]
|
||||
public abstract void BizSetInputCallback(IntPtr ctx, InputCallback cb);
|
||||
|
||||
[UnmanagedFunctionPointer(cc)]
|
||||
public delegate void TraceCallback(string msg);
|
||||
[BizImport(cc, Compatibility = true)]
|
||||
|
|
|
@ -4,10 +4,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
{
|
||||
public partial class MGBAHawk : IInputPollable
|
||||
{
|
||||
private readonly LibmGBA.InputCallback InputCallback;
|
||||
public int LagCount { get; set; }
|
||||
public bool IsLagFrame { get; set; }
|
||||
|
||||
[FeatureNotImplemented]
|
||||
public IInputCallbackSystem InputCallbacks { get; private set; }
|
||||
private void InputCb()
|
||||
{
|
||||
// most things are already handled in the core, this is just for event.oninputpoll
|
||||
InputCallbacks.Call();
|
||||
}
|
||||
private InputCallbackSystem _inputCallbacks = new InputCallbackSystem();
|
||||
public IInputCallbackSystem InputCallbacks => _inputCallbacks;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
throw;
|
||||
}
|
||||
|
||||
InputCallbacks = new MemoryBasedInputCallbackSystem(this, "System Bus", new[] { 0x4000130u });
|
||||
InputCallback = new LibmGBA.InputCallback(InputCb);
|
||||
LibmGBA.BizSetInputCallback(Core, InputCallback);
|
||||
}
|
||||
|
||||
public IEmulatorServiceProvider ServiceProvider { get; }
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 751a87dd3a7b4bdc2b2b00fa89ace69b685529ce
|
||||
Subproject commit ade176cfbaca2903ab40d998287f9eb1e84624b5
|
Loading…
Reference in New Issue