Here is the link to the updated code working with pygame.
I can confirm this code works with the adaptive controller.