Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
106 user(s) are online (95 user(s) are browsing Forums)

Members: 2
Guests: 104

trixie, Mr_byte, more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 61 62 63 (64) 65 66 67 ... 74 »
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Did our SDL2 already distributed with our gamecontrollerdb.txt ? Or should be separately as it now ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Looks good , but how it handled from developers pov? I mean for example i have that in code:

// Init joystick subsystem
    
{
        
SDL_Init(SDL_INIT_GAMECONTROLLER);
        
auto gamecontrollerdbPath8 = (dataPath "System" "gamecontrollerdb.txt").u8string();
        if (-
== SDL_GameControllerAddMappingsFromFile((const char*)gamecontrollerdbPath8.c_str()))
        {
            
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING"Cro-Mag Rally""Couldn't load gamecontrollerdb.txt!"gSDLWindow);
        }
    }



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 ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Tested, just added my string to file you point out and recompile SDL2 with make it works ! Cool !


Edited by kas1e on 2022/10/3 10:12:55
Edited by kas1e on 2022/10/3 10:25:55
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

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.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Javier
Yeah, manual adding works too too

Quote:

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.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

AFAIK it already embedded when you build SDL2.

https://www.amigans.net/modules/newbb/viewtopic.php?topic_id=8246

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@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

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
I create pool request to SDL2 with new mapping for Logitech Dual F310 one, if you can approve it plz.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Not too shy to talk
Not too shy to talk


See User information
@all

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 - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@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.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
2.24.0 RC2 is available: https://github.com/AmigaPorts/SDL-2.0/ ... /tag/v2.24.0-rc2-amigaos4

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

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

Compiles fine with ScummVM (full build, no issues)

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

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,

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
2.26.1 RC1 is available. Changes:

- Compile with GCC 11.2
- Fix shaped window alpha bitmap creation
- Enable virtual joysticks
- Add a workaround for game controller detection (AmigaOS 4 GUIDs are unfortunately broken)
- Add 2in1 game controller
- Update installer: delete old libSDL2.so soft links

https://github.com/AmigaPorts/SDL-2.0/ ... /tag/v2.26.1-rc1-amigaos4

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

Thanks, will going to test it
Is the latest 1.5 GUI included?

https://www.amigans.net/modules/newbb/ ... id=133116#forumpost133116

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
In some project we do use SDL for just an AUDIO, and our code initialisation looks like this:

if (SDL_WasInit(SDL_INIT_EVERYTHING) == 0) {
        if (
SDL_Init(SDL_INIT_AUDIO) < 0) {
            
Com_Printf ("Couldn't init SDL audio: %s\n"SDL_GetError ());
            return 
0;
        }
    } else if (
SDL_WasInit(SDL_INIT_AUDIO) == 0) {
        if (
SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) {
            
Com_Printf ("Couldn't init SDL audio: %s\n"SDL_GetError ());
            return 
0;
        }
    }


Then, deinitialization looks like this:

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).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just popping in
Just popping in


See User information
Hi,

Don't you have to use SDL_OpenAudio before using SDL_CloseAudio?

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@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.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just popping in
Just popping in


See User information
Did you try something like (SDL_WasInit(SDL_INIT_EVERYTHING) == SDL_WasInit(SDL_INIT_AUDIO)) instead?

Go to top

  Register To Post
« 1 ... 61 62 63 (64) 65 66 67 ... 74 »

 




Currently Active Users Viewing This Thread: 3 ( 0 members and 3 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project