mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 15:25:31 +00:00
Added state output for OpenTK.Input.Joystick
This commit is contained in:
parent
82a2c9113c
commit
d33d0c7387
|
@ -228,14 +228,31 @@ namespace Examples.Tests
|
||||||
|
|
||||||
int DrawGamePads(Graphics gfx, int line)
|
int DrawGamePads(Graphics gfx, int line)
|
||||||
{
|
{
|
||||||
|
line++;
|
||||||
DrawString(gfx, "GamePads:", line++);
|
DrawString(gfx, "GamePads:", line++);
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
GamePadCapabilities caps = GamePad.GetCapabilities(i);
|
GamePadCapabilities caps = GamePad.GetCapabilities(i);
|
||||||
GamePadState state = GamePad.GetState(i);
|
GamePadState state = GamePad.GetState(i);
|
||||||
|
if (state.IsConnected)
|
||||||
|
{
|
||||||
DrawString(gfx, caps.ToString(), line++);
|
DrawString(gfx, caps.ToString(), line++);
|
||||||
DrawString(gfx, state.ToString(), line++);
|
DrawString(gfx, state.ToString(), line++);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
line++;
|
||||||
|
DrawString(gfx, "Joysticks:", line++);
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
JoystickCapabilities caps = Joystick.GetCapabilities(i);
|
||||||
|
JoystickState state = Joystick.GetState(i);
|
||||||
|
if (state.IsConnected)
|
||||||
|
{
|
||||||
|
DrawString(gfx, caps.ToString(), line++);
|
||||||
|
DrawString(gfx, state.ToString(), line++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue