add sdl2 controller support
allows someone to grab an xbox or playstation style controller for lindbergh
- best for driving & fighting games
- shooting games are still better with a mouse or lightgun using evdev
That is a good idea. I would also suggest to document on how to get this stared, like how to configure on a config file, etc.
That is a good idea. I would also suggest to document on how to get this stared, like how to configure on a config file, etc.
There is no configuration required. It's plug in a gamepad & play. As long as the controller is supported under SDL2, there should be no issues.
Would it be possible to add the key name instead of just the code? Like SDLK_A?
Would it be possible to add the key name instead of just the code? Like SDLK_A?
For what? SDL keys are already implemented and are self explanatory.
For a cleaner code.
Would it be possible to add the key name instead of just the code? Like SDLK_A?
For what? SDL keys are already implemented and are self explanatory.
Nevermaind, I was looking at a different part of the code.
Sorry I've been slow here, it is on my radar to merge in!
Thank you so much for this work, it looks really good - I'm happy to merge with one small consideration:
Running evdev + SDL controllers at the same time will cause issues which is the default currently. I quite liked when you could use evdev for controllers, but still have SDL available for keyboard presses so you didn't have to map absolutely everything - I wonder if we should change the INPUT_MODE selector to be?
- SDL Keyboard/Mouse + SDL Controllers
- SDL Keyboard/Mouse + EVDEV Controllers
- Just EVDEV Controllers
With 0 still being the default.
What do we think?
@bobbydilley rebased to Master & updated the input modes as per your suggestions.
That is a good idea. I would also suggest to document on how to get this stared, like how to configure on a config file, etc.
There is no configuration required. It's plug in a gamepad & play. As long as the controller is supported under SDL2, there should be no issues.
I forgot to include the context on why i said this one before. I had issues on my Steam Deck, even i tried to disable the Steam Input. I was building the loader using distrobox, then tried to run it (still under distrobox).
Running evdev + SDL controllers at the same time will cause issues which is the default currently. I quite liked when you could use evdev for controllers, but still have SDL available for keyboard presses so you didn't have to map absolutely everything - I wonder if we should change the INPUT_MODE selector to be?
This might be the cause, but i don't have enough evidence to support.
I was reviewing the code. In glxhooks.c you added pollEvents(); to the function glXSwapBuffers.
Adding that, setting the games to not use SDL, will use X11 input and SDL input at the same time.
I am not sure about that. I also know that function needs to be cleaned up.
It is required for games that use glx and has no conflicts with X11 input.