diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.Joypad.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.Joypad.cs index febfe41b52..6883714d93 100644 --- a/BizHawk.Client.Common/lua/EmuLuaLibrary.Joypad.cs +++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.Joypad.cs @@ -27,7 +27,11 @@ namespace BizHawk.Client.Common private readonly Lua _lua; - public LuaTable joypad_get(object controller = null) + [LuaMethodAttributes( + "get", + "TODO" + )] + public LuaTable Get(object controller = null) { var buttons = _lua.NewTable(); foreach (var button in Global.ControllerOutput.Source.Type.BoolButtons) @@ -61,7 +65,11 @@ namespace BizHawk.Client.Common return buttons; } - public LuaTable joypad_getimmediate() + [LuaMethodAttributes( + "getimmediate", + "TODO" + )] + public LuaTable GetImmediate() { var buttons = _lua.NewTable(); foreach (var button in Global.ActiveController.Type.BoolButtons) @@ -72,7 +80,11 @@ namespace BizHawk.Client.Common return buttons; } - public void joypad_set(LuaTable buttons, object controller = null) + [LuaMethodAttributes( + "set", + "TODO" + )] + public void Set(LuaTable buttons, object controller = null) { try { @@ -103,7 +115,6 @@ namespace BizHawk.Client.Common theValue = null; } - if (!invert) { if (theValue == true) @@ -164,7 +175,11 @@ namespace BizHawk.Client.Common } } - public void joypad_setanalog(LuaTable controls, object controller = null) + [LuaMethodAttributes( + "setanalog", + "TODO" + )] + public void SetAnalog(LuaTable controls, object controller = null) { try { diff --git a/BizHawk.Client.Common/lua/LuaLibraryBase.cs b/BizHawk.Client.Common/lua/LuaLibraryBase.cs index 71dc171419..432e0242e7 100644 --- a/BizHawk.Client.Common/lua/LuaLibraryBase.cs +++ b/BizHawk.Client.Common/lua/LuaLibraryBase.cs @@ -45,7 +45,7 @@ namespace BizHawk.Client.Common if (docs != null) { - docs.Add(Name, luaName, method, luaMethodAttr.Description); + docs.Add(Name, luaMethodAttr.Name, method, luaMethodAttr.Description); } } } diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.cs index 6963545e30..3839e1d022 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.cs @@ -94,7 +94,7 @@ namespace BizHawk.Client.EmuHawk _formsLibrary.LuaRegister(lua, Docs); _guiLibrary.LuaRegister(lua, Docs); new InputLuaLibrary(_lua).LuaRegister(lua, Docs); - new JoypadLuaLibrary(_lua).LuaRegister(lua, Docs); + new JoypadLuaLibrary(_lua).LuaRegisterNew(lua, Docs); new MemoryLuaLibrary().LuaRegister(lua, Docs); new MainMemoryLuaLibrary(_lua).LuaRegister(lua, Docs); new MovieLuaLibrary(_lua).LuaRegister(lua, Docs);