Joypad.Set Nox Fixed

This commit is contained in:
Rolanmen1 2012-03-29 19:16:25 +00:00
parent 4337ea9d63
commit 1c6b792a28
1 changed files with 3 additions and 4 deletions

View File

@ -1228,8 +1228,7 @@ namespace BizHawk.MultiClient
LuaTable buttons = lua.NewTable();
foreach (string button in Global.ControllerOutput.Source.Type.BoolButtons)
if (button.Substring(0, 2) == "P" + LuaInt(controller).ToString())
MessageBox.Show(button);
//buttons[button] = Global.ControllerOutput[button];
buttons[button] = Global.ControllerOutput[button];
//zero 23-mar-2012 - wtf is this??????
buttons["clear"] = null;
@ -1247,11 +1246,11 @@ namespace BizHawk.MultiClient
return buttons;
}
public void joypad_set(object slot, LuaTable buttons)
public void joypad_set(LuaTable buttons)
{
foreach (var button in buttons.Keys)
if(Convert.ToBoolean(buttons[button]) == true)
Global.ClickyVirtualPadController.Click("P" + slot.ToString() + " " + button.ToString());
Global.ClickyVirtualPadController.Click(button.ToString());
}
//----------------------------------------------------