move some logic from mainform to InputManager
This commit is contained in:
parent
a3c586b480
commit
910c37d434
|
@ -73,6 +73,17 @@ namespace BizHawk.Client.Common
|
|||
ControllerOutput.Source = session.MovieOut;
|
||||
}
|
||||
|
||||
public void ToggleStickies()
|
||||
{
|
||||
StickyXorAdapter.MassToggleStickyState(ActiveController.PressedButtons);
|
||||
AutofireStickyXorAdapter.MassToggleStickyState(AutoFireController.PressedButtons);
|
||||
}
|
||||
|
||||
public void ToggleAutoStickies()
|
||||
{
|
||||
AutofireStickyXorAdapter.MassToggleStickyState(ActiveController.PressedButtons);
|
||||
}
|
||||
|
||||
private static Controller BindToDefinition(ControllerDefinition def, IDictionary<string, Dictionary<string, string>> allBinds, IDictionary<string, Dictionary<string, AnalogBind>> analogBinds)
|
||||
{
|
||||
var ret = new Controller(def);
|
||||
|
|
|
@ -669,12 +669,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (InputManager.ClientControls["Autohold"])
|
||||
{
|
||||
InputManager.StickyXorAdapter.MassToggleStickyState(InputManager.ActiveController.PressedButtons);
|
||||
InputManager.AutofireStickyXorAdapter.MassToggleStickyState(InputManager.AutoFireController.PressedButtons);
|
||||
InputManager.ToggleStickies();
|
||||
}
|
||||
else if (InputManager.ClientControls["Autofire"])
|
||||
{
|
||||
InputManager.AutofireStickyXorAdapter.MassToggleStickyState(InputManager.ActiveController.PressedButtons);
|
||||
InputManager.ToggleAutoStickies();
|
||||
}
|
||||
|
||||
// autohold/autofire must not be affected by the following inputs
|
||||
|
|
Loading…
Reference in New Issue