mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 08:06:59 +00:00
[Input] JoystickState.ToString now prints hat pos
This commit is contained in:
parent
05bbc0b3f4
commit
01c3b51be6
|
@ -145,9 +145,10 @@ namespace OpenTK.Input
|
|||
sb.Append(String.Format("{0:f4}", GetAxis(JoystickAxis.Axis0 + i)));
|
||||
}
|
||||
return String.Format(
|
||||
"{{Axes:{0}; Buttons: {1}; IsConnected: {2}}}",
|
||||
"{{Axes:{0}; Buttons: {1}; Hat: {2}; IsConnected: {3}}}",
|
||||
sb.ToString(),
|
||||
Convert.ToString((int)buttons, 2).PadLeft(16, '0'),
|
||||
hat0,
|
||||
IsConnected);
|
||||
}
|
||||
|
||||
|
@ -303,6 +304,11 @@ namespace OpenTK.Input
|
|||
{
|
||||
equals &= GetAxisUnsafe(i) == other.GetAxisUnsafe(i);
|
||||
}
|
||||
for (int i = 0; equals && i < MaxHats; i++)
|
||||
{
|
||||
JoystickHat hat = JoystickHat.Hat0 + i;
|
||||
equals &= GetHat(hat).Equals(other.GetHat(hat));
|
||||
}
|
||||
return equals;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue