gamepad

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