Use 1-based indexing for button/axis names of OpenTK gamepads

(to match DirectInput)
This commit is contained in:
YoshiRulz 2021-08-20 07:58:02 +10:00
parent be19b1bb14
commit 591d92fe51
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ namespace BizHawk.Bizware.OpenTK3
{
var known = devices[index];
devices[index] = null;
Console.WriteLine(known is null ? $"Dropped gamepad X{index}/J{index}" : $"Dropped gamepad {known.InputNamePrefixShort}: was {known.MappingsDatabaseName}");
Console.WriteLine(known is null ? $"Dropped gamepad X{index + 1}/J{index + 1}" : $"Dropped gamepad {known.InputNamePrefixShort}: was {known.MappingsDatabaseName}");
}
if (!initialized) return;
lock (_syncObj)
@ -145,7 +145,7 @@ namespace BizHawk.Bizware.OpenTK3
HapticsChannels = _gamePadCapabilities != null && _gamePadCapabilities.Value.HasLeftVibrationMotor && _gamePadCapabilities.Value.HasRightVibrationMotor
? new[] { "Left", "Right" } // two haptic motors
: new[] { "Mono" }; // one or zero haptic motors -- in the latter case, pretend it's mono anyway as that doesn't seem to cause problems
InputNamePrefixShort = $"{(MappedGamePad ? "X" : "J")}{_deviceIndex}";
InputNamePrefixShort = $"{(MappedGamePad ? "X" : "J")}{_deviceIndex + 1}";
InputNamePrefix = $"{InputNamePrefixShort} ";
MappingsDatabaseName = $"{guid ?? Guid.Empty} {name}";
Update();