partly fix #2656, I guess. This was a shortcoming in the architecture that allowed the joypad API developers to make a mistake. There will be other fallout from that, but this is the minimal fix.
This commit is contained in:
parent
3fb35b1599
commit
6f04ff6252
|
@ -68,6 +68,18 @@ namespace BizHawk.Client.Common
|
|||
var buttonToSet = controller == null ? button : $"P{controller} {button}";
|
||||
if (state == null) _inputManager.ButtonOverrideAdapter.UnSet(buttonToSet);
|
||||
else _inputManager.ButtonOverrideAdapter.SetButton(buttonToSet, state.Value);
|
||||
|
||||
//"Overrides" is a gross line of code in that flushes overrides into the current controller.
|
||||
//That's not really the way it was meant to work which was that it should pull all its values through the filters before ever using them.
|
||||
//Of course the code that does that is in the main loop and the lua API wouldnt know how to do it.
|
||||
//I regret the whole hotkey filter chain OOP soup approach. Anyway, the code that
|
||||
|
||||
//in a crude, CRUDE, *CRUDE* approximation of what the main loop does, we need to pull the physical input again before it's freshly overridded
|
||||
//but really, everything the main loop does needs to be done here again.
|
||||
//I'm not doing that now.
|
||||
_inputManager.ActiveController.LatchFromPhysical(_inputManager.ControllerInputCoalescer);
|
||||
|
||||
//and here's where the overrides managed by this API are pushed in
|
||||
_inputManager.ActiveController.Overrides(_inputManager.ButtonOverrideAdapter);
|
||||
}
|
||||
catch
|
||||
|
|
Loading…
Reference in New Issue