Virtual Pad analog stick: Fix changing x axis name , fixes #2467

This commit is contained in:
alyosha-tas 2020-11-16 22:00:49 -05:00
parent 7865fe2980
commit fa08b25d37
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ namespace BizHawk.Client.EmuHawk
AxisSpec rangeY)
{
_inputManager = inputManager;
Name = name;
RangeX = rangeX;
RangeY = rangeY;
if (RangeX.Min >= -128 && RangeX.Max <= 127 && RangeY.Min >= -128 && RangeY.Max <= 127)
@ -84,7 +84,7 @@ namespace BizHawk.Client.EmuHawk
AnalogStick.Init(
_inputManager.StickyXorAdapter,
Name,
name,
RangeX,
!string.IsNullOrEmpty(secondaryName) ? secondaryName : Name.Replace("X", "Y"),
RangeY

View File

@ -66,7 +66,7 @@ namespace BizHawk.Client.EmuHawk
var scaleBase = Math.Min(Size.Width, Size.Height) - 10.0; // be circular when control is stretched
Name = XName = nameX;
XName = nameX;
_fullRangeX = rangeX;
ScaleX = scaleBase / rangeX.Range.Count();