projectM-visualizer / frontend-sdl-cpp

Standalone application based on libSDL that turns your desktop audio into awesome visuals. Available on most platforms supported by both libprojectM and libSDL.
GNU General Public License v3.0
66 stars 35 forks source link

Adding game controlers as input method #86

Open nuess0r opened 4 months ago

nuess0r commented 4 months ago

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

revmischa commented 4 months ago

Nice!

kblaschke commented 4 months ago

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 commented 3 months ago

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.