Virtual Pad - smarter clear function, only clears the sticky buttons pressed by the VirtualPad tool instead of also clearing stickies set by autohold hotkeys

This commit is contained in:
adelikat 2012-12-02 20:05:45 +00:00
parent 451f786660
commit bf35f63aa3
14 changed files with 187 additions and 177 deletions

View File

@ -152,20 +152,20 @@ namespace BizHawk.MultiClient
public override void Clear()
{
if (Global.Emulator.SystemId != "A26" && Global.Emulator.SystemId != "C64") return;
if (PU.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
if (B1.Checked) Global.StickyXORAdapter.SetSticky(Controller + " B", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
PR.Checked = false;
B1.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
Global.StickyXORAdapter.SetSticky(Controller + " Select", false);
Global.StickyXORAdapter.SetSticky(Controller + " Start", false);
Global.StickyXORAdapter.SetSticky(Controller + " B", false);
}
}
}

View File

@ -122,10 +122,11 @@ namespace BizHawk.MultiClient
{
if (Global.Emulator.SystemId != "A26") return;
if (B1.Checked) Global.StickyXORAdapter.SetSticky("Reset", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky("Pause", false);
B1.Checked = false;
B2.Checked = false;
Global.StickyXORAdapter.SetSticky("Reset", false);
Global.StickyXORAdapter.SetSticky("Pause", false);
}
}
}

View File

@ -353,6 +353,72 @@ namespace BizHawk.MultiClient
}
else
{
if (KF1.Checked) Global.StickyXORAdapter.SetSticky("Key F1", false);
if (KF3.Checked) Global.StickyXORAdapter.SetSticky("Key F3", false);
if (KF5.Checked) Global.StickyXORAdapter.SetSticky("Key F5", false);
if (KF7.Checked) Global.StickyXORAdapter.SetSticky("Key F7", false);
if (KLeftArrow.Checked) Global.StickyXORAdapter.SetSticky("Key Left Arrow", false);
if (K1.Checked) Global.StickyXORAdapter.SetSticky("Key 1", false);
if (K2.Checked) Global.StickyXORAdapter.SetSticky("Key 2", false);
if (K3.Checked) Global.StickyXORAdapter.SetSticky("Key 3", false);
if (K4.Checked) Global.StickyXORAdapter.SetSticky("Key 4", false);
if (K5.Checked) Global.StickyXORAdapter.SetSticky("Key 5", false);
if (K6.Checked) Global.StickyXORAdapter.SetSticky("Key 6", false);
if (K7.Checked) Global.StickyXORAdapter.SetSticky("Key 7", false);
if (K8.Checked) Global.StickyXORAdapter.SetSticky("Key 8", false);
if (K9.Checked) Global.StickyXORAdapter.SetSticky("Key 9", false);
if (K0.Checked) Global.StickyXORAdapter.SetSticky("Key Plus", false);
if (KPlus.Checked) Global.StickyXORAdapter.SetSticky("Key Minus", false);
if (KMinus.Checked) Global.StickyXORAdapter.SetSticky("Key Pound", false);
if (KPound.Checked) Global.StickyXORAdapter.SetSticky("Key Clear/Home", false);
if (KClear.Checked) Global.StickyXORAdapter.SetSticky("Key Insert/Delete", false);
if (KInsert.Checked) Global.StickyXORAdapter.SetSticky("Key Control", false);
if (KCtrl.Checked) Global.StickyXORAdapter.SetSticky("Key Q", false);
if (KQ.Checked) Global.StickyXORAdapter.SetSticky("Key W", false);
if (KW.Checked) Global.StickyXORAdapter.SetSticky("Key E", false);
if (KE.Checked) Global.StickyXORAdapter.SetSticky("Key R", false);
if (KR.Checked) Global.StickyXORAdapter.SetSticky("Key T", false);
if (KT.Checked) Global.StickyXORAdapter.SetSticky("Key Y", false);
if (KY.Checked) Global.StickyXORAdapter.SetSticky("Key U", false);
if (KU.Checked) Global.StickyXORAdapter.SetSticky("Key I", false);
if (KI.Checked) Global.StickyXORAdapter.SetSticky("Key O", false);
if (KO.Checked) Global.StickyXORAdapter.SetSticky("Key P", false);
if (KP.Checked) Global.StickyXORAdapter.SetSticky("Key At", false);
if (KAt.Checked) Global.StickyXORAdapter.SetSticky("Key Asterisk", false);
if (KAsterisk.Checked) Global.StickyXORAdapter.SetSticky("Key Up Arrow", false);
if (KUpArrow.Checked) Global.StickyXORAdapter.SetSticky("Key Restore", false);
if (KRST.Checked) Global.StickyXORAdapter.SetSticky("Key Run/Stop", false);
if (KRun.Checked) Global.StickyXORAdapter.SetSticky("Key Lck", false);
if (KLck.Checked) Global.StickyXORAdapter.SetSticky("Key A", false);
if (KA.Checked) Global.StickyXORAdapter.SetSticky("Key S", false);
if (KS.Checked) Global.StickyXORAdapter.SetSticky("Key D", false);
if (KD.Checked) Global.StickyXORAdapter.SetSticky("Key F", false);
if (KF.Checked) Global.StickyXORAdapter.SetSticky("Key G", false);
if (KG.Checked) Global.StickyXORAdapter.SetSticky("Key H", false);
if (KH.Checked) Global.StickyXORAdapter.SetSticky("Key J", false);
if (KJ.Checked) Global.StickyXORAdapter.SetSticky("Key K", false);
if (KK.Checked) Global.StickyXORAdapter.SetSticky("Key L", false);
if (KL.Checked) Global.StickyXORAdapter.SetSticky("Key Colon", false);
if (KColon.Checked) Global.StickyXORAdapter.SetSticky("Key Semicolon", false);
if (KSemicolon.Checked) Global.StickyXORAdapter.SetSticky("Key Equal", false);
if (KEquals.Checked) Global.StickyXORAdapter.SetSticky("Key Return", false);
if (KReturn.Checked) Global.StickyXORAdapter.SetSticky("Key Commodore", false);
if (KCommodore.Checked) Global.StickyXORAdapter.SetSticky("Key Left Shift", false);
if (KLeftShift.Checked) Global.StickyXORAdapter.SetSticky("Key Z", false);
if (KZ.Checked) Global.StickyXORAdapter.SetSticky("Key X", false);
if (KX.Checked) Global.StickyXORAdapter.SetSticky("Key C", false);
if (KC.Checked) Global.StickyXORAdapter.SetSticky("Key V", false);
if (KV.Checked) Global.StickyXORAdapter.SetSticky("Key B", false);
if (KB.Checked) Global.StickyXORAdapter.SetSticky("Key N", false);
if (KN.Checked) Global.StickyXORAdapter.SetSticky("Key M", false);
if (KM.Checked) Global.StickyXORAdapter.SetSticky("Key Comma", false);
if (KComma.Checked) Global.StickyXORAdapter.SetSticky("Key Period", false);
if (KPeriod.Checked) Global.StickyXORAdapter.SetSticky("Key Slash", false);
if (KSlash.Checked) Global.StickyXORAdapter.SetSticky("Key Right Shift", false);
if (KRightShift.Checked) Global.StickyXORAdapter.SetSticky("Key Cursor Up/Down", false);
if (KCursorUp.Checked) Global.StickyXORAdapter.SetSticky("Key Cursor Left/Right", false);
if (KCursorLeft.Checked) Global.StickyXORAdapter.SetSticky("Key Space", false);
KF1.Checked = false;
KF3.Checked = false;
KF5.Checked = false;
@ -419,72 +485,6 @@ namespace BizHawk.MultiClient
KCursorUp.Checked = false;
KCursorLeft.Checked = false;
KSpace.Checked = false;
Global.StickyXORAdapter.SetSticky("Key F1", false);
Global.StickyXORAdapter.SetSticky("Key F3", false);
Global.StickyXORAdapter.SetSticky("Key F5", false);
Global.StickyXORAdapter.SetSticky("Key F7", false);
Global.StickyXORAdapter.SetSticky("Key Left Arrow", false);
Global.StickyXORAdapter.SetSticky("Key 1", false);
Global.StickyXORAdapter.SetSticky("Key 2", false);
Global.StickyXORAdapter.SetSticky("Key 3", false);
Global.StickyXORAdapter.SetSticky("Key 4", false);
Global.StickyXORAdapter.SetSticky("Key 5", false);
Global.StickyXORAdapter.SetSticky("Key 6", false);
Global.StickyXORAdapter.SetSticky("Key 7", false);
Global.StickyXORAdapter.SetSticky("Key 8", false);
Global.StickyXORAdapter.SetSticky("Key 9", false);
Global.StickyXORAdapter.SetSticky("Key Plus", false);
Global.StickyXORAdapter.SetSticky("Key Minus", false);
Global.StickyXORAdapter.SetSticky("Key Pound", false);
Global.StickyXORAdapter.SetSticky("Key Clear/Home", false);
Global.StickyXORAdapter.SetSticky("Key Insert/Delete", false);
Global.StickyXORAdapter.SetSticky("Key Control", false);
Global.StickyXORAdapter.SetSticky("Key Q", false);
Global.StickyXORAdapter.SetSticky("Key W", false);
Global.StickyXORAdapter.SetSticky("Key E", false);
Global.StickyXORAdapter.SetSticky("Key R", false);
Global.StickyXORAdapter.SetSticky("Key T", false);
Global.StickyXORAdapter.SetSticky("Key Y", false);
Global.StickyXORAdapter.SetSticky("Key U", false);
Global.StickyXORAdapter.SetSticky("Key I", false);
Global.StickyXORAdapter.SetSticky("Key O", false);
Global.StickyXORAdapter.SetSticky("Key P", false);
Global.StickyXORAdapter.SetSticky("Key At", false);
Global.StickyXORAdapter.SetSticky("Key Asterisk", false);
Global.StickyXORAdapter.SetSticky("Key Up Arrow", false);
Global.StickyXORAdapter.SetSticky("Key Restore", false);
Global.StickyXORAdapter.SetSticky("Key Run/Stop", false);
Global.StickyXORAdapter.SetSticky("Key Lck", false);
Global.StickyXORAdapter.SetSticky("Key A", false);
Global.StickyXORAdapter.SetSticky("Key S", false);
Global.StickyXORAdapter.SetSticky("Key D", false);
Global.StickyXORAdapter.SetSticky("Key F", false);
Global.StickyXORAdapter.SetSticky("Key G", false);
Global.StickyXORAdapter.SetSticky("Key H", false);
Global.StickyXORAdapter.SetSticky("Key J", false);
Global.StickyXORAdapter.SetSticky("Key K", false);
Global.StickyXORAdapter.SetSticky("Key L", false);
Global.StickyXORAdapter.SetSticky("Key Colon", false);
Global.StickyXORAdapter.SetSticky("Key Semicolon", false);
Global.StickyXORAdapter.SetSticky("Key Equal", false);
Global.StickyXORAdapter.SetSticky("Key Return", false);
Global.StickyXORAdapter.SetSticky("Key Commodore", false);
Global.StickyXORAdapter.SetSticky("Key Left Shift", false);
Global.StickyXORAdapter.SetSticky("Key Z", false);
Global.StickyXORAdapter.SetSticky("Key X", false);
Global.StickyXORAdapter.SetSticky("Key C", false);
Global.StickyXORAdapter.SetSticky("Key V", false);
Global.StickyXORAdapter.SetSticky("Key B", false);
Global.StickyXORAdapter.SetSticky("Key N", false);
Global.StickyXORAdapter.SetSticky("Key M", false);
Global.StickyXORAdapter.SetSticky("Key Comma", false);
Global.StickyXORAdapter.SetSticky("Key Period", false);
Global.StickyXORAdapter.SetSticky("Key Slash", false);
Global.StickyXORAdapter.SetSticky("Key Right Shift", false);
Global.StickyXORAdapter.SetSticky("Key Cursor Up/Down", false);
Global.StickyXORAdapter.SetSticky("Key Cursor Left/Right", false);
Global.StickyXORAdapter.SetSticky("Key Space", false);
}
}

View File

@ -153,11 +153,31 @@ namespace BizHawk.MultiClient
public void Clear()
{
if (Global.Emulator.SystemId != "Coleco") return;
if (PU.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
if (KeyLeft.Checked) Global.StickyXORAdapter.SetSticky(Controller + " L", false);
if (KeyRight.Checked) Global.StickyXORAdapter.SetSticky(Controller + " R", false);
if (KP1.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key0", false);
if (KP2.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key1", false);
if (KP3.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key2", false);
if (KP4.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key3", false);
if (KP5.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key4", false);
if (KP6.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key5", false);
if (KP7.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key6", false);
if (KP8.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key7", false);
if (KP9.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key8", false);
if (KPStar.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Key9", false);
if (KP0.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Star", false);
if (KPPound.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Pound", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
PR.Checked = false;
KeyLeft.Checked = false;
KeyRight.Checked = false;
KP1.Checked = false;
@ -172,25 +192,6 @@ namespace BizHawk.MultiClient
KPStar.Checked = false;
KP0.Checked = false;
KPPound.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
Global.StickyXORAdapter.SetSticky(Controller + " L", false);
Global.StickyXORAdapter.SetSticky(Controller + " R", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key0", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key1", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key2", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key3", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key4", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key5", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key6", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key7", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key8", false);
Global.StickyXORAdapter.SetSticky(Controller + " Key9", false);
Global.StickyXORAdapter.SetSticky(Controller + " Star", false);
Global.StickyXORAdapter.SetSticky(Controller + " Pound", false);
}
}
}

View File

@ -225,6 +225,17 @@ namespace BizHawk.MultiClient
public override void Clear()
{
if (Global.Emulator.SystemId != "GB") return;
if (PU.Checked) Global.StickyXORAdapter.SetSticky("Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky("Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky("Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky("Right", false);
if (B1.Checked) Global.StickyXORAdapter.SetSticky("Select", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky("Start", false);
if (B3.Checked) Global.StickyXORAdapter.SetSticky("B", false);
if (B4.Checked) Global.StickyXORAdapter.SetSticky("A", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
@ -234,15 +245,6 @@ namespace BizHawk.MultiClient
B2.Checked = false;
B3.Checked = false;
B4.Checked = false;
Global.StickyXORAdapter.SetSticky("Up", false);
Global.StickyXORAdapter.SetSticky("Down", false);
Global.StickyXORAdapter.SetSticky("Left", false);
Global.StickyXORAdapter.SetSticky("Right", false);
Global.StickyXORAdapter.SetSticky("Select", false);
Global.StickyXORAdapter.SetSticky("Start", false);
Global.StickyXORAdapter.SetSticky("B", false);
Global.StickyXORAdapter.SetSticky("A", false);
}
}
}

View File

@ -238,28 +238,28 @@ namespace BizHawk.MultiClient
public override void Clear()
{
if (Global.Emulator.SystemId != "GBA") return;
if (PU.Checked) Global.StickyXORAdapter.SetSticky("Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky("Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky("Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky("Right", false);
if (B1.Checked) Global.StickyXORAdapter.SetSticky("Select", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky("Start", false);
if (B3.Checked) Global.StickyXORAdapter.SetSticky("B", false);
if (B4.Checked) Global.StickyXORAdapter.SetSticky("A", false);
if (B5.Checked) Global.StickyXORAdapter.SetSticky("L", false);
if (B6.Checked) Global.StickyXORAdapter.SetSticky("R", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
PR.Checked = false;
B1.Checked = false;
B2.Checked = false;
B3.Checked = false;
B4.Checked = false;
B5.Checked = false;
B6.Checked = false;
Global.StickyXORAdapter.SetSticky("Up", false);
Global.StickyXORAdapter.SetSticky("Down", false);
Global.StickyXORAdapter.SetSticky("Left", false);
Global.StickyXORAdapter.SetSticky("Right", false);
Global.StickyXORAdapter.SetSticky("Select", false);
Global.StickyXORAdapter.SetSticky("Start", false);
Global.StickyXORAdapter.SetSticky("B", false);
Global.StickyXORAdapter.SetSticky("A", false);
Global.StickyXORAdapter.SetSticky("L", false);
Global.StickyXORAdapter.SetSticky("R", false);
}
}
}

View File

@ -116,9 +116,9 @@ namespace BizHawk.MultiClient
return;
}
B1.Checked = false;
if (B1.Checked) Global.StickyXORAdapter.SetSticky("Power", false);
Global.StickyXORAdapter.SetSticky("Power", false);
B1.Checked = false;
}
}
}

View File

@ -205,6 +205,16 @@ namespace BizHawk.MultiClient
public override void Clear()
{
if (Global.Emulator.SystemId != "GEN") return;
if (PU.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
if (B1.Checked) Global.StickyXORAdapter.SetSticky(Controller + " C", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Start", false);
if (B3.Checked) Global.StickyXORAdapter.SetSticky(Controller + " B", false);
if (B4.Checked) Global.StickyXORAdapter.SetSticky(Controller + " A", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
@ -214,15 +224,6 @@ namespace BizHawk.MultiClient
B2.Checked = false;
B3.Checked = false;
B4.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
Global.StickyXORAdapter.SetSticky(Controller + " C", false);
Global.StickyXORAdapter.SetSticky(Controller + " Start", false);
Global.StickyXORAdapter.SetSticky(Controller + " B", false);
Global.StickyXORAdapter.SetSticky(Controller + " A", false);
}
}
}

View File

@ -206,6 +206,16 @@ namespace BizHawk.MultiClient
public override void Clear()
{
if (Global.Emulator.SystemId != "NES") return;
if (PU.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
if (B1.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Select", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Start", false);
if (B3.Checked) Global.StickyXORAdapter.SetSticky(Controller + " B", false);
if (B4.Checked) Global.StickyXORAdapter.SetSticky(Controller + " A", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
@ -215,15 +225,6 @@ namespace BizHawk.MultiClient
B2.Checked = false;
B3.Checked = false;
B4.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
Global.StickyXORAdapter.SetSticky(Controller + " Select", false);
Global.StickyXORAdapter.SetSticky(Controller + " Start", false);
Global.StickyXORAdapter.SetSticky(Controller + " B", false);
Global.StickyXORAdapter.SetSticky(Controller + " A", false);
}
}
}

View File

@ -205,7 +205,17 @@ namespace BizHawk.MultiClient
public override void Clear()
{
if (Global.Emulator.SystemId != "PCE") return;
if (Global.Emulator.SystemId != "PCE" && Global.Emulator.SystemId != "PCECD" && Global.Emulator.SystemId != "SGX") return;
if (PU.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
if (B1.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Select", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Run", false);
if (B3.Checked) Global.StickyXORAdapter.SetSticky(Controller + " B2", false);
if (B4.Checked) Global.StickyXORAdapter.SetSticky(Controller + " B1", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
@ -215,15 +225,6 @@ namespace BizHawk.MultiClient
B2.Checked = false;
B3.Checked = false;
B4.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
Global.StickyXORAdapter.SetSticky(Controller + " Select", false);
Global.StickyXORAdapter.SetSticky(Controller + " Run", false);
Global.StickyXORAdapter.SetSticky(Controller + " B2", false);
Global.StickyXORAdapter.SetSticky(Controller + " B1", false);
}
}
}

View File

@ -158,7 +158,8 @@ namespace BizHawk.MultiClient
private void Buttons_CheckedChanged(object sender, EventArgs e)
{
if (Global.Emulator.SystemId != "SMS") return;
if (Global.Emulator.SystemId != "SMS" && Global.Emulator.SystemId != "GG" && Global.Emulator.SystemId != "SG") return;
if (sender == PU)
Global.StickyXORAdapter.SetSticky(Controller + " Up", PU.Checked);
else if (sender == PD)
@ -175,7 +176,15 @@ namespace BizHawk.MultiClient
public override void Clear()
{
if (Global.Emulator.SystemId != "SMS") return; //TODO: GG & SG can share pad?
if (Global.Emulator.SystemId != "SMS" && Global.Emulator.SystemId != "GG" && Global.Emulator.SystemId != "SG") return;
if (PU.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
if (B1.Checked) Global.StickyXORAdapter.SetSticky(Controller + " B1", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky(Controller + " B2", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
@ -183,15 +192,6 @@ namespace BizHawk.MultiClient
B1.Checked = false;
B2.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
Global.StickyXORAdapter.SetSticky(Controller + " Select", false);
Global.StickyXORAdapter.SetSticky(Controller + " Start", false);
Global.StickyXORAdapter.SetSticky(Controller + " B1", false);
Global.StickyXORAdapter.SetSticky(Controller + " B2", false);
}
}
}

View File

@ -100,7 +100,8 @@ namespace BizHawk.MultiClient
private void Buttons_CheckedChanged(object sender, EventArgs e)
{
if (Global.Emulator.SystemId != "SMS") return;
if (Global.Emulator.SystemId != "SMS" && Global.Emulator.SystemId != "GG" && Global.Emulator.SystemId != "SG") return;
else if (sender == B1)
{
Global.StickyXORAdapter.SetSticky("Pause", B1.Checked);
@ -121,12 +122,13 @@ namespace BizHawk.MultiClient
public override void Clear()
{
if (Global.Emulator.SystemId != "SMS") return;
if (Global.Emulator.SystemId != "SMS" && Global.Emulator.SystemId != "GG" && Global.Emulator.SystemId != "SG") return;
if (B1.Checked) Global.StickyXORAdapter.SetSticky("Pause", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky("Reset", false);
B1.Checked = false;
B2.Checked = false;
Global.StickyXORAdapter.SetSticky("Pause", false);
Global.StickyXORAdapter.SetSticky("Reset", false);
}
}
}

View File

@ -308,6 +308,19 @@ namespace BizHawk.MultiClient
}
else
{
if (PU.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
if (PD.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
if (PL.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
if (PR.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
if (B1.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Select", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Start", false);
if (B3.Checked) Global.StickyXORAdapter.SetSticky(Controller + " B", false);
if (B4.Checked) Global.StickyXORAdapter.SetSticky(Controller + " A", false);
if (B5.Checked) Global.StickyXORAdapter.SetSticky(Controller + " X", false);
if (B6.Checked) Global.StickyXORAdapter.SetSticky(Controller + " Y", false);
if (B7.Checked) Global.StickyXORAdapter.SetSticky(Controller + " L", false);
if (B8.Checked) Global.StickyXORAdapter.SetSticky(Controller + " R", false);
PU.Checked = false;
PD.Checked = false;
PL.Checked = false;
@ -322,19 +335,6 @@ namespace BizHawk.MultiClient
B6.Checked = false;
B7.Checked = false;
B8.Checked = false;
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
Global.StickyXORAdapter.SetSticky(Controller + " Select", false);
Global.StickyXORAdapter.SetSticky(Controller + " Start", false);
Global.StickyXORAdapter.SetSticky(Controller + " B", false);
Global.StickyXORAdapter.SetSticky(Controller + " A", false);
Global.StickyXORAdapter.SetSticky(Controller + " X", false);
Global.StickyXORAdapter.SetSticky(Controller + " Y", false);
Global.StickyXORAdapter.SetSticky(Controller + " L", false);
Global.StickyXORAdapter.SetSticky(Controller + " R", false);
}
}
}

View File

@ -160,10 +160,11 @@ namespace BizHawk.MultiClient
}
else
{
if (B1.Checked) Global.StickyXORAdapter.SetSticky("Reset", false);
if (B2.Checked) Global.StickyXORAdapter.SetSticky("Power", false);
B1.Checked = false;
B2.Checked = false;
Global.StickyXORAdapter.SetSticky("Reset", false);
Global.StickyXORAdapter.SetSticky("Power", false);
}
}
}