diff --git a/BizHawk.Emulation/Consoles/PC Engine/Input.cs b/BizHawk.Emulation/Consoles/PC Engine/Input.cs index 68875c274e..22425bb112 100644 --- a/BizHawk.Emulation/Consoles/PC Engine/Input.cs +++ b/BizHawk.Emulation/Consoles/PC Engine/Input.cs @@ -15,7 +15,29 @@ public string GetControllersAsMneumonic() { - return "|........|0|"; //TODO: implement + //TODO: Implement all controllers + + string input = ""; + if (Controller.IsPressed("Up")) input += "U"; + else input += " "; + if (Controller.IsPressed("Down")) input += "D"; + else input += " "; + if (Controller.IsPressed("Left")) input += "L"; + else input += " "; + if (Controller.IsPressed("Right")) input += "R"; + else input += " "; + if (Controller.IsPressed("I")) input += "1"; + else input += " "; + if (Controller.IsPressed("II")) input += "2"; + else input += " "; + if (Controller.IsPressed("Select")) input += "S"; + else input += " "; + if (Controller.IsPressed("Run")) input += "R"; + else input += " "; + + input += "|.|"; //TODO: Add commands like reset here + + return input; } private byte inputSelector; diff --git a/BizHawk.Emulation/Consoles/Sega/SMS/Input.cs b/BizHawk.Emulation/Consoles/Sega/SMS/Input.cs index 349e83bbdb..b7f4a846d3 100644 --- a/BizHawk.Emulation/Consoles/Sega/SMS/Input.cs +++ b/BizHawk.Emulation/Consoles/Sega/SMS/Input.cs @@ -48,7 +48,7 @@ input += "|"; if (Controller.IsPressed("Reset")) input += "R"; - else input += "0"; + else input += "."; input += "|"; diff --git a/BizHawk.MultiClient/RenderPanel.cs b/BizHawk.MultiClient/RenderPanel.cs index 5bfc346d88..2b5864146c 100644 --- a/BizHawk.MultiClient/RenderPanel.cs +++ b/BizHawk.MultiClient/RenderPanel.cs @@ -259,20 +259,7 @@ namespace BizHawk.MultiClient if (Global.Config.DisplayInput) { - string input = ""; - switch (Global.Emulator.SystemId) - { - case "SMS": - input = MakeSMSInputDisplay(); - break; - case "PCE": - input = MakePCEInputDisplay(); - break; - default: - break; - - } - + string input = MakeInputDisplay(); MessageFont.DrawString(null, input, 1, 16, new Color4(Color.White)); } } @@ -309,60 +296,12 @@ namespace BizHawk.MultiClient } } - public string MakeSMSInputDisplay() + public string MakeInputDisplay() { - string input = ""; - if (Global.Emulator.Controller.IsPressed("P1 Up")) input += "U"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P1 Down")) input += "D"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P1 Left")) input += "L"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P1 Right")) input += "R"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P1 B1")) input += "1"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P1 B2")) input += "2"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P2 Up")) input += "U"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P2 Down")) input += "D"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P2 Left")) input += "L"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P2 Right")) input += "R"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P2 B1")) input += "1"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("P2 B2")) input += "2"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("Pause")) input += "S"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("Reset")) input += "R"; - else input += " "; - return input; - } - - public string MakePCEInputDisplay() - { - string input = ""; - if (Global.Emulator.Controller.IsPressed("Up")) input += "U"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("Down")) input += "D"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("Left")) input += "L"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("Right")) input += "R"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("I")) input += "1"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("II")) input += "2"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("Select")) input += "S"; - else input += " "; - if (Global.Emulator.Controller.IsPressed("Run")) input += "R"; - else input += " "; - return input; + string tmp = Global.Emulator.GetControllersAsMneumonic(); + tmp = tmp.Replace(".", " "); + tmp = tmp.Replace("|", ""); + return tmp; } }