Fixed rendering of joysticks and gamepads

Joysticks and gamepad states would overlap, causing some lines to be
unreadable. This is now fixed.