VOGONS

Common searches


First post, by Slàinte

User metadata

I have a small question... how can you get the full name for a device with SDL in windows? I am having trouble as MMSYSTEM determines max length for device names to 32 chars truncating it... I see the full name for my controller on screen... how did you get it? I know this is not really related to DOSBOX directly... but i am really intrigued and in need of the full controller name on an SDL based app, thnx in adv for your answers

Reply 2 of 3, by Slàinte

User metadata

from the code I got this:

#if OLD_JOYSTICK
LOG_MSG("Using joystick %s with %d axes and %d buttons",SDL_JoystickName(stick),axes,buttons);
JOYSTICK_Enable(stick,true);
#endif

but SDL_JoystickName(stick) is returning effectively up to 32 chars (31 and a NULL termination)... I have not found a way to bypass this, as SDL gets the name directly from Win32 MM and this is restricting the return value to this lenght... is this project using any kind of hacked SDL or something? This is my real intention for the post... finding out how to bypass that blasted limit...