frontend-sdl2
frontend-sdl2 copied to clipboard
Adding game controlers as input method
I had a Bluetooth joypad lying around and though that it would be handy to be able to remote control the projectM frontend.
As SDL provides everything needed to handle game controller it was straight forward to add it. I didn't add SDL controller class or so, just extended the SDL window class. Feel free to refactor that if you think this is messy.
Tested on GNU/Linux, Debian Sid, Gnome3
Code comes mainly from this tutorial: https://lazyfoo.net/tutorials/SDL/19_gamepads_and_joysticks/index.php
Nice!
That looks quite good, and should surely work on all platforms!
Lemme fix the Windows build issue tomorrow, as the build check workflow is broken (after GitHub Actions Windows runners being broken and then fixed again). You may have to rebase on latest master after the fix is pushed to make the build check work, as the workflow file is used from the branch.
The Windows build check is now fixed.
Please rebase onto current master and force-push your branch, then the checks here will probably all be green.
Sorry for the long stall - I've not forgotten about this, just currently not actively working on the frontend and focusing on the core library. Will review and eventually merge this once the libprojectM 4.2 release is out!
Rebased your branch onto PR #97 to make the build checks work again - please update your local working branch accordingly to avoid conflicts if you want to add something.
Sorry for the long wait.
I'm (almost) ready to pick up on this again, so I'd then go ahead and rebase your branch on top of the lastest master and other incoming changes, shuffle a few things around and add a settings tab to the UI for configuring the game controller.
I can do this in your fork and this PR if you're okay with that, or I can copy it over to my fork and open a new PR.
Yes, you can do this in my fork, just go ahead.
Thanks for all your work!