Get the idname of detected inputs?

rockard wrote on Friday, March 28, 2008:

When using SDL, it is possible to get the name of the detected inputs. This way, I can
map the appropriate input buttons to the correct once in my games.

In my case, I want to connect a ps2-converter and find the id-name, and then automaticly map the correct buttons to the correct actions. The possibility to get the name isn’t available in glfw, as far as I can see? Why? Or maybe I missed it?

Anyway, If someone could help me find the correct command in a windows include, I would appreciate it very much! I am under a tight deadline, programming gameplay day and night for a contest. =)

thanks!!
/Rickard

elmindreda wrote on Saturday, March 29, 2008:

Nope, it’s not included in the current GLFW API. Sorry about that.

You’re not the first to request it, though, so it probably will be (but not before your deadline, I think).

lonesock wrote on Wednesday, April 02, 2008:

Well, you can check inside the SDL source code. I think the function you want is named:

static char *GetJoystickName(int index, const char *szRegKey)

and for Windows it’s in the file src\joystick\win32\SDL_mmjoystick.c