joystick

Pygame headless setup

Pygame headless setup Question: I am using pygame’s joystick api to use a joystick with my project on a headless system, but pygame requires a “screen” so I have setup a dummy video system to over come this. It worked fine but now all of a sudden it gives me this error: Traceback (most recent …

Total answers: 2

pygame: detect Joystick disconnect, and wait for it to be reconnected

pygame: detect Joystick disconnect, and wait for it to be reconnected Question: I’m using a pygame.joystick.Joystick object and want to be able to print a message asking the user to reconnect a usb joystick once it’s been unplugged. right now I have (roughly): js = pygame.joystick.Joystick(0) #… some game code and stuff pygame.joystick.quit() pygame.joystick.init() while …

Total answers: 3