Is our OS4 version of SDL2, when find SDL_GameControllerAddMappingsFromFile() call, add in the memory our amigaos4 things and we have no needs for special amigaos4 ifdefs in the code of game ?
IIRC you can have gamecontrollerdb.txt on game drawer and it will be read for game (if such code is). Add your joypad/gamepad/joystick config/line to gamecontrollerdb.txt and it should auto-magically be added to the game.
IMHO gamecontrollerdb.txt should be on SYS:Devs and then all games that support SDL2/gamecontrollerdb.txt would read and add such controllers to games/apps.
IMHO gamecontrollerdb.txt should be on SYS:Devs and then all games that support SDL2/gamecontrollerdb.txt would read and add such controllers to games/apps.
It's small enough and already inside of SDL2 as Capehill point out: and i tested, even if game's code read mapping from external gamecontrollerdb.txt, having mapping inside of SDL2 did the trick as well.
I mean, our gamecontrollerdb.txt is small enough, and can be as it now be in SDL2 itself too.
@javier Yeah, already checked that all your finding inside of SDL2 (capehill point out me few posts above to that part). Just my one wasn't before that why my gamepad not works
I know they are seperate, but would it be possible to have a complete SDL2 Developer Suite with SDL2_Mixer, SDL2_Image, e.t.c for both clib2 and newlib ?
I already compiled SDL_Mixer for clib2, but I am still having problems with Modplug, Mikmod .
It would be great if we can use the same libraries and SDK for SDL2 based ports ?
@Sinan Imagine the work to be done for anyone handling such a beast. SDL_Mixer alone need mikmod, flac, ogg and vorbis libs. SDL2_Image need png, jpeg, webp and co libs. Everything should be in sync, and all the time updated. Person who will handle it, will be driven to madness and burnout fast :) That why we have os4depot, where every 3d party deps separated. IMHO there no problems to download necessary archive and put it to SDK, but that only IMHO of course.
Changes: - Add more game controller mappings - Add SDL_GetPreferredLocales support, currently hard-coded to en_GB - Fix a crash issue due to missing nullptr check
New mapping to add: ------------------- Type: PlayStation 2 like pad Manufactured: MY-POWER CO.,LTD
32496e3120555342204a6f7973746963,2In1 USB Joystick,platform:AmigaOS4,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,-leftx:h0.8,+leftx:h0.2,-lefty:h0.1,+lefty:h0.4,lefttrigger:b6,righttrigger:b7,
if (snd_inited) {
SDL_CloseAudio ();
snd_inited = 0;
}
if (SDL_WasInit(SDL_INIT_EVERYTHING) == SDL_INIT_AUDIO)
SDL_Quit();
else
SDL_QuitSubSystem(SDL_INIT_AUDIO);
The problem is that on exit, we do have "returned with undfreed signals 20000000!". Is it something about wrong deinitialisation of the SDL ? Or maybe you aware of what usually cause this 2000000 unfreed signals ?
When we build without SDL, then not unfreed signals on exit, so it looks like SDL code from our side do something wrong (or not do).
@Petrol Yeah, it is done in other parts of code, but probabaly issue there, is that SDL_Quit should be used in any case, even if go SDL_INIT_AUDIO() way, it seems still should be both SDL_QuitSubSystem(SDL_INIT_AUDIO); and SDL_Quit(); too.
Or, this (SDL_WasInit(SDL_INIT_EVERYTHING) == SDL_INIT_AUDIO) wrong and didn't pass the check after SDL was init with SDL_INIT_EVERYTHING.