Also handle lack of input callbacks when removing a lua function, not just on clear all
This commit is contained in:
parent
ac43fe203b
commit
aa01b725a6
|
@ -18,12 +18,12 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public new bool Remove(NamedLuaFunction function)
|
||||
{
|
||||
if (Global.Emulator.CanPollInput())
|
||||
if (Global.Emulator.InputCallbacksAvailable())
|
||||
{
|
||||
Global.Emulator.AsInputPollable().InputCallbacks.Remove(function.Callback);
|
||||
}
|
||||
|
||||
if (Global.Emulator.CanDebug() && Global.Emulator.MemoryCallbacksAvailable())
|
||||
if (Global.Emulator.MemoryCallbacksAvailable())
|
||||
{
|
||||
Global.Emulator.AsDebuggable().MemoryCallbacks.Remove(function.Callback);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue