make circular analog range setting work in ares
This commit is contained in:
parent
69a938f29b
commit
26115624e4
|
@ -191,7 +191,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public ClientProfile SelectedProfile { get; set; } = ClientProfile.Unknown;
|
||||
|
||||
// N64
|
||||
// TODO: make this not N64-specific, it doesn't need to be
|
||||
public bool N64UseCircularAnalogConstraint { get; set; } = true;
|
||||
|
||||
// Run-Control settings
|
||||
|
|
|
@ -872,8 +872,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
InputManager.ActiveController.LatchFromPhysical(finalHostController);
|
||||
|
||||
InputManager.ActiveController.ApplyAxisConstraints(
|
||||
(Emulator is N64 && Config.N64UseCircularAnalogConstraint) ? "Natural Circle" : null);
|
||||
if (Config.N64UseCircularAnalogConstraint)
|
||||
{
|
||||
InputManager.ActiveController.ApplyAxisConstraints("Natural Circle");
|
||||
}
|
||||
|
||||
InputManager.ActiveController.OR_FromLogical(InputManager.ClickyVirtualPadController);
|
||||
InputManager.AutoFireController.LatchFromPhysical(finalHostController);
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Common
|
|||
var length = Math.Sqrt(xVal * xVal + yVal * yVal);
|
||||
var ratio = Magnitude / length;
|
||||
return ratio < 1.0
|
||||
? ((int) (xVal * ratio), (int) (yVal * ratio))
|
||||
? ((int) Math.Round(xVal * ratio), (int) Math.Round(yVal * ratio))
|
||||
: ((int) xVal, (int) yVal);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue