frontend-sdl2 icon indicating copy to clipboard operation
frontend-sdl2 copied to clipboard

Adding game controlers as input method

Open nuess0r opened this issue 1 year ago • 5 comments
trafficstars

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

nuess0r avatar Jul 29 '24 20:07 nuess0r

Nice!

revmischa avatar Jul 29 '24 20:07 revmischa

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.

kblaschke avatar Aug 05 '24 22:08 kblaschke

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.

kblaschke avatar Aug 18 '24 17:08 kblaschke

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!

kblaschke avatar Feb 28 '25 10:02 kblaschke

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.

kblaschke avatar Mar 17 '25 22:03 kblaschke

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.

kblaschke avatar Oct 06 '25 15:10 kblaschke

Yes, you can do this in my fork, just go ahead.

Thanks for all your work!

nuess0r avatar Oct 06 '25 17:10 nuess0r