NagyD / SDLPoP

An open-source port of Prince of Persia, based on the disassembly of the DOS version.
GNU General Public License v3.0
1.1k stars 141 forks source link

SDL_Joystick support gone, bring it back? #140

Closed vanfanel closed 7 years ago

vanfanel commented 7 years ago

Hi there,

It seems SDLPoP left the SDL_Joystick interface in favor of the SDL_GameController interface, and I didn't notice until today. My PSX gamepad with USB adaptor does not work anymore due to this, SDL_GameController is OK for things like the M$ gamepad, but not for USB joysticks I guess. Now, my PSX gamepad works with any other SDL2 game, except SDLPoP :( In fact, SDL_IsGameController() returns "false" for all the USB joysticks I have around... So, any chances to see SDL_Joystick interface as a fallback if SDL_GameController is not detected? It's an easy fix on set_joy_mode(), a matter of adding a new SDL_Joystick * in data.h and, well, bringing back the movement detection code again.

Thanks!

vanfanel commented 7 years ago

I have done a PR fixing this, since I wanted SDLPoP joystick support working again with my wired pads: https://github.com/NagyD/SDLPoP/pull/141

NagyD commented 7 years ago

I have merged your PR, so I guess I can close this?

vanfanel commented 7 years ago

Yes, no problem on closing it. Thanks! :)