File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ def gamepads(with_sdl):
6060
6161def is_virtual (pad ):
6262 stick = sdl2 .SDL_GameControllerGetJoystick (pad )
63- return joystick .SDL_JoystickName (stick ) == b"Virtual Joystick"
63+ name = joystick .SDL_JoystickName (stick )
64+ return name in [b"Virtual Joystick" , b"Virtual Controller" ]
6465
6566
6667# Test if SDL_GameControllerMappingForGUID is able to be tested
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def is_virtual(stick):
7171 virtual = sdl2 .SDL_JoystickIsVirtual (stick ) == SDL_TRUE
7272 elif isinstance (stick .contents , sdl2 .SDL_Joystick ):
7373 name = sdl2 .SDL_JoystickName (stick )
74- virtual = name == b"Virtual Joystick"
74+ virtual = name in [ b"Virtual Joystick" , b"Virtual Controller" ]
7575 return virtual
7676
7777
You can’t perform that action at this time.
0 commit comments