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

Can't move around or do anything #104

Closed ghost closed 7 years ago

ghost commented 7 years ago

Neither the arrows keys nor the WASD keys do anything. Or did you set different default controls?

Falcury commented 7 years ago

Do you have a controller plugged in by any chance? In that case joystick mode would be enabled at launch, and you could switch back to keyboard mode using Ctrl+K.

ghost commented 7 years ago

No, just keyboard and mouse.

zaps166 commented 7 years ago

Sometimes SDL2 can detect Touchpad as a joystick.

ghost commented 7 years ago

I see. It didn't seem to work with a normal mouse, though, nor a keyboard.

NagyD commented 7 years ago

So, do the arrow keys work after you press Ctrl+K?

ghost commented 7 years ago

Yeah. My fault for forgetting this! :D

NagyD commented 7 years ago

Maybe I should add an option to SDLPoP.ini that can disable automatic joystick mode at startup? Ctrl+J would still switch to that mode, of course.

Falcury commented 7 years ago

Or, some way to automatically switch if you start using the other input method? I.e. the other input method would also be polled, but that input would usually be discarded unless it's detected that the input method should be switched.

NagyD commented 7 years ago

Or, some way to automatically switch if you start using the other input method?

Now, that's even better. Autodetection is usually better than manual configuration. I'll try that today.

NagyD commented 7 years ago

Or, some way to automatically switch if you start using the other input method?

Here is my first attempt on a new branch: https://github.com/NagyD/SDLPoP/commits/auto_input_mode I'd like you to test it because I don't have a gamepad or a joystick.

Falcury commented 7 years ago

OK! That's nice! I just tested it with the Xbox 360 controller. The autodetection works! Some quirks: