Fix removing of registered functions via Lua console
This commit is contained in:
parent
b604d81d10
commit
b2b8edb319
|
@ -194,7 +194,7 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
foreach (var nlf in _luaFunctions.Where(nlf => nlf.Guid.ToString() == guid.ToString()))
|
||||
{
|
||||
_luaFunctions.RemoveFunction(nlf);
|
||||
_luaFunctions.Remove(nlf);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
foreach (var nlf in _luaFunctions.Where(nlf => nlf.Name == name.ToString()))
|
||||
{
|
||||
_luaFunctions.RemoveFunction(nlf);
|
||||
_luaFunctions.Remove(nlf);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public void RemoveFunction(NamedLuaFunction function)
|
||||
public new bool Remove(NamedLuaFunction function)
|
||||
{
|
||||
Global.Emulator.CoreComm.InputCallback.Remove(function.Callback);
|
||||
Global.Emulator.CoreComm.MemoryCallbackSystem.Remove(function.Callback);
|
||||
Remove(function);
|
||||
return base.Remove(function);
|
||||
}
|
||||
|
||||
public void ClearAll()
|
||||
|
|
|
@ -703,7 +703,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
item.Stop();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
var guid = FunctionView.Items[index].SubItems[2].Text;
|
||||
var nlf = GlobalWin.Tools.LuaConsole.LuaImp.RegisteredFunctions[guid];
|
||||
GlobalWin.Tools.LuaConsole.LuaImp.RegisteredFunctions.RemoveFunction(nlf);
|
||||
GlobalWin.Tools.LuaConsole.LuaImp.RegisteredFunctions.Remove(nlf);
|
||||
}
|
||||
PopulateListView();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue