mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-06 10:20:42 +00:00
Added state information for GamePads
This commit is contained in:
parent
ef580daf75
commit
487e67473f
|
@ -239,6 +239,8 @@ namespace Examples.Tests
|
||||||
DrawKeyboard(gfx, keyboard, line++);
|
DrawKeyboard(gfx, keyboard, line++);
|
||||||
DrawMouse(gfx, mouse, line++);
|
DrawMouse(gfx, mouse, line++);
|
||||||
DrawJoysticks(gfx, Joysticks, line++);
|
DrawJoysticks(gfx, Joysticks, line++);
|
||||||
|
|
||||||
|
line = DrawGamePads(gfx, line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +251,19 @@ namespace Examples.Tests
|
||||||
PixelType.UnsignedByte, data.Scan0);
|
PixelType.UnsignedByte, data.Scan0);
|
||||||
TextBitmap.UnlockBits(data);
|
TextBitmap.UnlockBits(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DrawGamePads(Graphics gfx, int line)
|
||||||
|
{
|
||||||
|
DrawString(gfx, "GamePads:", line++);
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
GamePadCapabilities caps = GamePad.GetCapabilities(i);
|
||||||
|
GamePadState state = GamePad.GetState(i);
|
||||||
|
DrawString(gfx, caps.ToString(), line++);
|
||||||
|
DrawString(gfx, state.ToString(), line++);
|
||||||
|
}
|
||||||
|
return line;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnLoad(EventArgs e)
|
protected override void OnLoad(EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue