Remember me

Lost Password?

Register now!


Who's Online
81 user(s) are online (57 user(s) are browsing Forums)

Members: 1
Guests: 80

samo79, more...

Support us!

Recent OS4 Files

Report message:*

Re: SDL2

Subject: Re: SDL2
by kas1e on 2019/2/7 20:50:31


Also i notice another issue with iconification on SDL2: Iconification not always grab the correct icon of binary, but instead fallback to the deafult "ENVARC:Sys/def_window". I tested few games, and in some it works, in other are not. I for sake of tests even take the same icon everywhere, and from one binary compiled with the same SDL2 it works, with another one compiled with same SDL2 it didn't.

All i have on serial for working ones are:

[OS4_IconifyWindow] Iconifying 'PROTOTYPE'
[OS4_HideWindow] Hiding window 'PROTOTYPE'

And for non working ones are:

[OS4_GetDiskObject] Falling back to 'ENVARC:Sys/def_window'
[OS4_IconifyWindow] Iconifying 'Foobillard++'
[OS4_HideWindow] Hiding window 'Foobillard++'

or for other game:

[OS4_GetDiskObject] Falling back to 'ENVARC:Sys/def_window'
[OS4_IconifyWindow] Iconifying 'Friking Shark'
[OS4_HideWindow] Hiding window 'Friking Shark'

I then do some debug prinfs in OS4_GetDiskObject():

static struct DiskObject *OS4_GetDiskObject(_THIS)
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;

struct DiskObject *diskObject NULL;

    if (
videodata->appName) {
diskObject IIcon->GetDiskObject(videodata->appName);
dprintf("We after diskObject = IIcon->GetDiskObject(videodata->appName);\n");
dprintf("videodata->appName are : %s\n"videodata->appName);

    if (!
diskObject) {
CONST_STRPTR fallbackIconName "ENVARC:Sys/def_window";

dprintf("Falling back to '%s'\n"fallbackIconName);
diskObject IIcon->GetDiskObjectNew(fallbackIconName);


And, while i have come into that if (videodata->appName), so i have words "we after blabla", and printf for videodata->appName show name correctly "foobillard++", diskobject seems still NULL or mess (like it unitialized), and so it fallback on default icon.

So then i put for sake of test firstly that:

diskObject = IIcon->GetDiskObject("PROGDIR:foobillard++");

And it works, icon takes, all fine. But as videodata->appName printfs just "foobillard++", i tried that:

diskObject = IIcon->GetDiskObject("foobillard++");

And it fail the same !

So seems there some bug related to the getting of real path of the filename. If i put also that:

diskObject = IIcon->GetDiskObject("work:foobillardplusplus/foobillard++"); , it also works fine.

I remember we have kind of same issue for SDL1 some time ago, but this one was arise when we just run app from another place, and not from its home directory, like:


ram:> works:game/game.exe

But probably same changes which you do for SDL1 to fix that can be applied to the SDL2 to fix what we have now. If it of course same issue, but looks very well like it is (if it works with PROGIDR: and full path, but didn't with just pure name).

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project