Custom Gamecontroller File Mapping

I made a mapping header file for both my joystick and gamecontroller library… how do I only plug in the mapping library for axes, buttons, and hats?

Please explain your problem in more detail.

Are you talking about using SDL_AddGamepadMapping or is it some custom mapping format that is unique for your library?

It is some custom mapping format for my library that is unique.

So this question has nothing to do with SDL?

I still have no clue what you’re asking for. Maybe you could start explaining what it means to “plug in the mapping library”?

By plug in, meaning to program the mapping library.

Seems like a big ask to expect someone to be able to tell you how you should write your whole library. At least I’m not that person.

Then how do you use SDL_AddGameControllerMapping?

Have you looked at the docs?

I have personally never used this function but it seems like you just pass a string containing a comma separated list with the GUID (generated by SDL_JoystickGetGUIDString), a name for the controller (of your choice) followed by the actual mappings. The explanation of the format is a bit of a mess but it looks pretty straight forward when looking at the example. Ask if you have questions and we can probably figure it out…