@Capehill
Another issue is probabaly not related to SDL1 itself (or maybe related, just i do not know at moment), and its some strange one.
I found that when i run some game (sdl1/gl4es/etc) in fullscreen mode. When i run it just as it, and enable fps counter, it show me 30 fps for example. And everything is looks just like 30 fps.
Then, when i do "amiga+m", and made by mouse workbench window (or any other window on workbench) to be active, i still have on other screen those 30 fps (as expected), but when i jump back to the game screen again and make it active, this time fps is doubled to 70 and everythng start to looks like its now indeed 70 fps.
Then, any switch back to workbench and making it active, doing game be 30 fps (as exptected as it not active anymore), and swithcing back to game make it 70fps. But not from first time! I.e. when you run it, i can see workbench is not active, and that my game active, but technically like not :)
It seems that when i run game first time (and even if i operate in it, play in it, i.e. its active), something busy happens. Once i made workbench active and then back to the game: fps back to normal.
I may think of course that its game doing something, but "depending on screens" its just amiga-thing, so maybe something on our side ?
Sorry its a bit unclear, and i can't say if it SDL1 or what else , as i can't find any other game/test which can show the same.
I probabaly can do some hack like when game runs, call intuition Lock/Active of workbench, and then back again to game, but that strange anyway..
EDIT:
I think it can be something about the way how SDL initialisation done , maybe only with this game i have some sort of combo of dbl-bufergin / vsync and something else which didn't showups before.
I currently just hack the game's init code like this:
... initial game's init code ...
#ifdef __amigaos4__
struct Screen *wb_screen;
struct Window *first_wb_window;
struct Screen *game_screen;
struct Window *first_game_window;
struct IntuitionIFace *IIntuition = NULL;
struct GraphicsIFace *IGraphics = NULL;
struct Library *GfxBase = IExec->OpenLibrary("graphics.library", 50);
IGraphics = (struct GraphicsIFace*)IExec->GetInterface(GfxBase, "main", 1, NULL);
struct Library *IntuitionBase = IExec->OpenLibrary("intuition.library", 50);
IIntuition = (struct IntuitionIFace*)IExec->GetInterface(IntuitionBase, "main", 1, NULL);
// get workbnech screen and first window pointer, so to make it active when need it
wb_screen = IIntuition->LockPubScreen(NULL);
first_wb_window = wb_screen->FirstWindow;
IIntuition->UnlockPubScreen(NULL, wb_screen);
#endif
.... init SDL/opengl/etc ...
#ifdef __amigaos4__
// get our new screen pointer and first window to make it active when need it
long lock = IIntuition->LockIBase(0);
game_screen = ((struct IntuitionBase *)IntuitionBase)->ActiveScreen;
first_game_window = game_screen->FirstWindow;
IIntuition->UnlockIBase(lock);
// activate the first window on workbench
IIntuition->ActivateWindow(first_wb_window);
// active our game's window on new screen back to have stable FPS back.
IIntuition->ActivateWindow(first_game_window);
IExec->DropInterface((struct Interface*)IGraphics);
IExec->CloseLibrary(GfxBase);
IExec->DropInterface((struct Interface*)IIntuition);
IExec->CloseLibrary(IntuitionBase);
#endif
Then it works. Through it still interesting to know why that happens and should't it be fixed in SDL1 or at least to find out why it like this.
Edited by kas1e on 2019/10/15 13:37:16
Edited by kas1e on 2019/10/15 17:25:20
Edited by kas1e on 2019/10/15 17:26:03