Home Creators Posts Import Register Favorites Logout

Content

Have you ever decided to build a PowerPoint presentation in C? Because I just did it.

Something that's been bothering me for awhile is how SDL handles game controllers: you plug in darn near anything, and it can figure out what to do with it, so the developer can assume the player is using an Xbox controller even if the actual gamepad is built by Sony or Nintendo. It can sort it out whether it's a first-party controller you paid 70 bucks for, or it's something totally anonymous, bought for a few yuan at a chinese street market.

But all SDL does is say "I know this controller, here's where its equivalent of the Xbox Y button is" to the programmer, and not "I know this controller, here's what it looks like" to the player.

I set out to change that.

This is a dirt-simple library that builds on SDL's ability to detect joysticks, to provide scalable images of its buttons and other features, so you can show users instructions that match the controller in their hand, even for controllers you've never heard of, and for screen resolutions that don't exist yet.

The project is over here on GitHub.

I am looking for artists that can build simple SVG images to fill out the database of controller images! If you know someone--or you are someone--hit me up!

Files

Introducing ControllerImage

This is a project I'm working on. I know I said "Link in bio!" but you can find it here: https://github.com/icculus/ControllerImage I need artists! Hit me up! Want to support my work? I crowdfund: https://patreon.com/icculus or https://github.com/sponsors/icculus ====== Images in this video: The Xbox button images are under a CC 4.0 license: https://creativecommons.org/licenses/by-sa/4.0/deed.en They were modified versions of the .svg files from Wikimedia Commons, created by user VictorPines. https://commons.wikimedia.org/wiki/File:Xbox_button_A.svg https://commons.wikimedia.org/wiki/File:Xbox_button_B.svg https://commons.wikimedia.org/wiki/File:Xbox_button_X.svg https://commons.wikimedia.org/wiki/File:Xbox_button_Y.svg The PlayStation buttons were originally public domain .PSD files from Metal-Txus on DeviantArt: https://www.deviantart.com/metal-txus/art/Vector-PlayStation-buttons-441793653 I put them through a random PSD-to-SVG converter that mostly got it done, but is why the originals look good and realistic and mine look cartoony.

Comments

Kaz Redclaw

One thing I'd request is the ability to override this. I use a Xbox and 8bitdo controller on my PCs, but I greatly prefer playstation glyphs in the games because those are the ones that are muscle-mapped in my head. You give me an X, I have no idea where it is without looking at the controller, but if you tell me it's Triangle, I can hit it instantly.

Raptor85

I have this problem on steam deck! things that auto detect and "properly" show steam deck controls throw me off because my muscle memory is that X is the bottom button, but on deck it's left where square should be. Being able to override functionality like this system-wide would be amazing. BTW I do like in SDL3 how the button IDs have been renamed for the positions instead of xbox-specific names, it's a lot less confusing when writing and testing with non-xbox controllers. (no longer need to make a giant comment box to constantly remind myself of what position those button IDs are in...)