N64 virtualpad - allow -128, and fix exceptions if -128 was every requested

This commit is contained in:
adelikat 2014-06-29 20:32:28 +00:00
parent 893a8b16e5
commit 059849d403
2 changed files with 9 additions and 2 deletions

View File

@ -20,6 +20,13 @@ namespace BizHawk.Client.EmuHawk
AnalogStick.Name = Name;
AnalogStick.XName = Name;
AnalogStick.YName = Name.Replace("X", "Y"); // TODO: allow schema to dictate this but this is a convenient default
ManualX.Minimum = AnalogStick.MinX;
ManualX.Maximum = AnalogStick.MaxX;
ManualY.Minimum = AnalogStick.MinY;
ManualY.Maximum = AnalogStick.MaxY;
MaxXNumeric.Value = 127;
MaxYNumeric.Value = 127; // Note: these trigger change events that change the analog stick too
}

View File

@ -41,8 +41,8 @@ namespace BizHawk.Client.EmuHawk
private int _maxX = 127;
private int _maxY = 127;
private int MinX { get { return 0 - MaxX; } }
private int MinY { get { return 0 - MaxY; } }
public int MinX { get { return 0 - MaxX - 1; } }
public int MinY { get { return 0 - MaxY - 1; } }
private readonly Brush WhiteBrush = Brushes.White;
private readonly Brush GrayBrush = Brushes.LightGray;