Emscripten chrome SDL_SetWindowFullscreen bug
Fullscreen is messed up and I'm not sure if it's a chrome or SDL bug. This only happens on chrome, I also tested on firefox and safari. The problem started happening in https://github.com/libsdl-org/SDL/commit/737be31c63fb170f9c2853725fdcc4fb34989c2f. This is the scenario that messes up:
1 call SDL_SetWindowFullscreen(window, true); 2 call SDL_SetWindowFullscreen(window, false); 3 when I call SDL_SetWindowFullscreen(window, true); it no longer works
I'm testing this on M3 macbook air macOS version 15.7.2
I did some more testing and the second scenario actually broke earlier, I'll make a new issue for it
I'll look at this in the morning. In the worst case, we revert that commit and revisit for 3.6.0, since the fix was for a pathological case.
1 call SDL_SetWindowFullscreen(window, true); 2 call SDL_SetWindowFullscreen(window, false); 3 when I call SDL_SetWindowFullscreen(window, true); it no longer works
This is working for me on Chrome (just running testsprite, press alt-enter to go fullscreen and back). If you're literally just calling it twice in a row in the same mainloop iteration, yes, it definitely won't work (we intend to improve that behavior for 3.6.0 in #14574).
If this is "it won't go back to fullscreen when I try at some reasonably later time" then we should just revert 737be31c63fb170f9c2853725fdcc4fb34989c2f and revisit in 3.6.0, as it wasn't a crucial fix.