Python Forum
Cannot get pygame.JOYBUTTONDOWN to register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot get pygame.JOYBUTTONDOWN to register
#3
That works, thank you! I thought I was doing the same thing as the example in the pygame docs, but upon closer inspection, I found the following lines inside the main loop:

    # For each joystick:
    for i in range(joystick_count):
        joystick = pygame.joystick.Joystick(i)
        joystick.init()
It makes sense why mine wasn't working now, many thanks.
Reply


Messages In This Thread
RE: Cannot get pygame.JOYBUTTONDOWN to register - by dboxall123 - Feb-14-2022, 11:57 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020