From 9ddd3d56a8e52c2ef8b15b2a71dfd903a9c62dc5 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 25 Nov 2012 21:49:07 +0000 Subject: [PATCH] C64 - implement Restore key on client side, fixes to the Keyboard virtualpad --- BizHawk.MultiClient/Config.cs | 1 + BizHawk.MultiClient/Global.cs | 2 +- BizHawk.MultiClient/MainForm.cs | 1 + BizHawk.MultiClient/movie/InputAdapters.cs | 7 +++++++ .../tools/VirtualPadC64Keyboard.Designer.cs | 4 ++-- BizHawk.MultiClient/tools/VirtualPadC64Keyboard.cs | 8 ++++---- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 5101f72932..e45384cb9e 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -1225,6 +1225,7 @@ namespace BizHawk.MultiClient public string At; public string Asterisk; public string Up_Arrow; + public string Restore; public string Run_Stop; public string Lck; diff --git a/BizHawk.MultiClient/Global.cs b/BizHawk.MultiClient/Global.cs index ecaf0cd5eb..06a5aa77eb 100644 --- a/BizHawk.MultiClient/Global.cs +++ b/BizHawk.MultiClient/Global.cs @@ -129,7 +129,7 @@ namespace BizHawk.MultiClient { {"Key F1", "1"}, {"Key F3", "3"}, {"Key F5", "5"}, {"Key F7", "7"}, {"Key Left Arrow", "l"}, {"Key 1", "1"}, {"Key 2", "2"}, {"Key 3", "3"}, {"Key 4", "4"}, {"Key 5", "5"}, {"Key 6", "6"}, {"Key 7", "7"}, {"Key 8", "8"}, {"Key 9", "9"}, {"Key 0", "0"}, {"Key Plus", "+"}, {"Key Minus", "-"}, {"Key Pound", "l"}, {"Key Clear/Home", "c"}, {"Key Insert/Delete", "i"}, - {"Key Control", "c"}, {"Key Q", "Q"}, {"Key W", "W"}, {"Key E", "E"}, {"Key R", "R"}, {"Key T", "T"}, {"Key Y", "Y"}, {"Key U", "U"}, {"Key I", "I"}, {"Key O", "O"}, {"Key P", "P"}, {"Key At", "@"}, {"Key Asterisk", "*"}, {"Key Up Arrow", "u"}, {"Key RST", "r"}, + {"Key Control", "c"}, {"Key Q", "Q"}, {"Key W", "W"}, {"Key E", "E"}, {"Key R", "R"}, {"Key T", "T"}, {"Key Y", "Y"}, {"Key U", "U"}, {"Key I", "I"}, {"Key O", "O"}, {"Key P", "P"}, {"Key At", "@"}, {"Key Asterisk", "*"}, {"Key Up Arrow", "u"}, {"Key Restore", "r"}, {"Key Run/Stop", "s"}, {"Key Lck", "k"}, {"Key A", "A"}, {"Key S", "S"}, {"Key D", "D"}, {"Key F", "F"}, {"Key G", "G"}, {"Key H", "H"}, {"Key J", "J"}, {"Key K", "K"}, {"Key L", "L"}, {"Key Colon", ":"}, {"Key Semicolon", ";"}, {"Key Equal", "="}, {"Key Return", "e"}, {"Key Commodore", "o"}, {"Key Left Shift", "s"}, {"Key Z", "Z"}, {"Key X", "X"}, {"Key C", "C"}, {"Key V", "V"}, {"Key B", "B"}, {"Key N", "N"}, {"Key M", "M"}, {"Key Comma", ","}, {"Key Period", ">"}, {"Key Slash", "/"}, {"Key Right Shift", "s"}, {"Key Cursor Up/Down", "u"}, {"Key Cursor Left/Right", "l"}, {"Key Space", "_"} diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index bab1d289da..b3e00c03ef 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -1163,6 +1163,7 @@ namespace BizHawk.MultiClient CommodoreControls.BindMulti("Key At", Global.Config.C64Keyboard.At); CommodoreControls.BindMulti("Key Asterisk", Global.Config.C64Keyboard.Asterisk); CommodoreControls.BindMulti("Key Up Arrow", Global.Config.C64Keyboard.Up_Arrow); + CommodoreControls.BindMulti("Key Restore", Global.Config.C64Keyboard.Restore); CommodoreControls.BindMulti("Key Run/Stop", Global.Config.C64Keyboard.Run_Stop); CommodoreControls.BindMulti("Key Lck", Global.Config.C64Keyboard.Lck); CommodoreControls.BindMulti("Key A", Global.Config.C64Keyboard.A); diff --git a/BizHawk.MultiClient/movie/InputAdapters.cs b/BizHawk.MultiClient/movie/InputAdapters.cs index 6cd237bc80..b5a2f0ff00 100644 --- a/BizHawk.MultiClient/movie/InputAdapters.cs +++ b/BizHawk.MultiClient/movie/InputAdapters.cs @@ -433,6 +433,13 @@ namespace BizHawk.MultiClient foreach (string button in Global.BUTTONS["Commodore 64 Keyboard"].Keys) { + if (Global.BUTTONS["Commodore 64 Keyboard"][button] == "Key Restore") + { + int xx = 0; + xx++; + int y = xx; + y++; + } input.Append(IsBasePressed(button) ? Global.BUTTONS["Commodore 64 Keyboard"][button] : "."); } input.Append('|'); diff --git a/BizHawk.MultiClient/tools/VirtualPadC64Keyboard.Designer.cs b/BizHawk.MultiClient/tools/VirtualPadC64Keyboard.Designer.cs index 589455d82a..134be8c394 100644 --- a/BizHawk.MultiClient/tools/VirtualPadC64Keyboard.Designer.cs +++ b/BizHawk.MultiClient/tools/VirtualPadC64Keyboard.Designer.cs @@ -346,7 +346,7 @@ this.KF3.Text = "f 3"; this.KF3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.KF3.UseVisualStyleBackColor = true; - this.KF3.CausesValidationChanged += new System.EventHandler(this.Buttons_CheckedChanged); + this.KF3.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged); // // KF7 // @@ -374,7 +374,7 @@ this.KF5.Text = "f 5"; this.KF5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.KF5.UseVisualStyleBackColor = true; - this.KF5.CausesValidationChanged += new System.EventHandler(this.Buttons_CheckedChanged); + this.KF5.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged); // // KCtrl // diff --git a/BizHawk.MultiClient/tools/VirtualPadC64Keyboard.cs b/BizHawk.MultiClient/tools/VirtualPadC64Keyboard.cs index e8189a4d6b..fa30536893 100644 --- a/BizHawk.MultiClient/tools/VirtualPadC64Keyboard.cs +++ b/BizHawk.MultiClient/tools/VirtualPadC64Keyboard.cs @@ -33,15 +33,15 @@ namespace BizHawk.MultiClient } else if (sender == KF3) { - Global.StickyXORAdapter.SetSticky("Key F3", KF1.Checked); + Global.StickyXORAdapter.SetSticky("Key F3", KF3.Checked); } else if (sender == KF5) { - Global.StickyXORAdapter.SetSticky("Key F5", KF1.Checked); + Global.StickyXORAdapter.SetSticky("Key F5", KF5.Checked); } else if (sender == KF7) { - Global.StickyXORAdapter.SetSticky("Key F7", KF1.Checked); + Global.StickyXORAdapter.SetSticky("Key F7", KF7.Checked); } else if (sender == KLeftArrow) { @@ -165,7 +165,7 @@ namespace BizHawk.MultiClient } else if (sender == KRST) { - Global.StickyXORAdapter.SetSticky("Key RST", KRST.Checked); + Global.StickyXORAdapter.SetSticky("Key Restore", KRST.Checked); } else if (sender == KRun) {