There are still some unanswered related questions here wrt API, but this should suffice in any case.
This commit is contained in:
CasualPokePlayer 2022-06-24 01:17:51 -07:00
parent 4df256cd6b
commit d3d90eb70d
1 changed files with 6 additions and 3 deletions

View File

@ -159,14 +159,17 @@ namespace BizHawk.Client.Common
private void AddCallback() private void AddCallback()
{ {
_core.MemoryCallbacks.Add(new MemoryCallback(Scope, Type, Name, Callback, Address, AddressMask)); _core.MemoryCallbacks.Add(new MemoryCallback(Scope, Type, Name, DoCallback, Address, AddressMask));
} }
private void RemoveCallback() private void RemoveCallback()
{ {
_core.MemoryCallbacks.Remove(Callback); _core.MemoryCallbacks.Remove(DoCallback);
} }
private void DoCallback(uint address, uint value, uint flags)
=> Callback(address, value, flags);
public void ResetCallback() public void ResetCallback()
{ {
if (Active) if (Active)