Re-add an assignment in `InputManager.SyncControls` (fixes #3458)
partially reverts 781c152bf
also removed now-unused method `Controller.ForceType`
This commit is contained in:
parent
3f352792a6
commit
52acda9a02
|
@ -22,7 +22,7 @@ namespace BizHawk.Client.Common
|
|||
foreach (var channel in Definition.HapticsChannels) _haptics[channel] = 0;
|
||||
}
|
||||
|
||||
public ControllerDefinition Definition { get; private set; }
|
||||
public ControllerDefinition Definition { get; }
|
||||
|
||||
public bool IsPressed(string button) => _buttons[button];
|
||||
|
||||
|
@ -41,9 +41,6 @@ namespace BizHawk.Client.Common
|
|||
private readonly Dictionary<string, int> _haptics = new WorkingDictionary<string, int>();
|
||||
private readonly Dictionary<string, FeedbackBind> _feedbackBindings = new Dictionary<string, FeedbackBind>();
|
||||
|
||||
/// <summary>don't do this</summary>
|
||||
public void ForceType(ControllerDefinition newType) => Definition = newType;
|
||||
|
||||
public bool this[string button] => IsPressed(button);
|
||||
|
||||
// Looks for bindings which are activated by the supplied physical button.
|
||||
|
|
|
@ -64,6 +64,11 @@ namespace BizHawk.Client.Common
|
|||
ActiveController = BindToDefinition(def, config.AllTrollers, config.AllTrollersAnalog, config.AllTrollersFeedbacks);
|
||||
AutoFireController = BindToDefinitionAF(emulator, config.AllTrollersAutoFire, config.AutofireOn, config.AutofireOff);
|
||||
|
||||
// allow propagating controls that are in the current controller definition but not in the prebaked one
|
||||
// these two lines shouldn't be required anymore under the new system? --natt 2013
|
||||
// they were mostly not required, see #3458 --yoshi 2022
|
||||
ClickyVirtualPadController.Definition = def;
|
||||
|
||||
// Wire up input chain
|
||||
|
||||
UdLRControllerAdapter.Source = ActiveController.Or(AutoFireController);
|
||||
|
|
Loading…
Reference in New Issue