mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-23 22:31:06 +00:00
Fixed rendering of joysticks and gamepads
Joysticks and gamepad states would overlap, causing some lines to be unreadable. This is now fixed.
This commit is contained in:
parent
8350e8e2ce
commit
61f0918544
|
@ -163,7 +163,7 @@ namespace Examples.Tests
|
|||
}
|
||||
}
|
||||
|
||||
static void DrawJoysticks(Graphics gfx, IList<JoystickDevice> joysticks, int line)
|
||||
static int DrawJoysticks(Graphics gfx, IList<JoystickDevice> joysticks, int line)
|
||||
{
|
||||
float space = gfx.MeasureString(" ", TextFont).Width;
|
||||
|
||||
|
@ -192,6 +192,8 @@ namespace Examples.Tests
|
|||
|
||||
line++;
|
||||
}
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
protected override void OnUpdateFrame(FrameEventArgs e)
|
||||
|
@ -238,9 +240,8 @@ namespace Examples.Tests
|
|||
DrawString(gfx, TypedText.ToString(), line++);
|
||||
DrawKeyboard(gfx, keyboard, line++);
|
||||
DrawMouse(gfx, mouse, line++);
|
||||
DrawJoysticks(gfx, Joysticks, line++);
|
||||
|
||||
line = DrawGamePads(gfx, line);
|
||||
line = DrawJoysticks(gfx, Joysticks, line++);
|
||||
line = DrawGamePads(gfx, line++);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue