Start controllers in games that start only pygame's display.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ef866717c
commit
17fe11d229
1 file changed
+2
-1
+2
-1
@@ -401,7 +401,8 @@ class PygameDevices:
|
||||
"""Start the controller subsystem once pygame is running. Returns True when started."""
|
||||
if self.started:
|
||||
return True
|
||||
if not pygame.get_init():
|
||||
# Some games start only pygame's display, never pygame.init(); that is enough for controllers.
|
||||
if not (pygame.get_init() or pygame.display.get_init()):
|
||||
return False
|
||||
try:
|
||||
from pygame._sdl2 import controller
|
||||
|
||||
Reference in new issue
Block a user