-
Notifications
You must be signed in to change notification settings - Fork 64
Issues when toggling fullscreen #87
Comments
Hmm, the resizing should be handled by |
On that particular point, it seems Esc. is directly handled by the browser in a basic way, while SDL_SetWindowFullscreen calls emscripten_exit_fullscren() which is responsible for calling the strategy exit callback explicitely. |
OK, misread that and assumed that it was the other way around. I put some logging in the JS parts and it looks something like this: F, F:
F, Esc:
So, Edit: Commenting out the if here makes both behave the same. (The callback gets called later in |
(I wish I'd seen you edit earlier, sadly it wasn't there in my mailbox OTL This fixes the canvas size, the "size changed" event size (and consequently the missing "resized" event) - though maintaining F pressed still produces a buggy result. Do you want to file a bug against Emscripten, as restoreOldStyle looks like the proper place to call the callback? |
Hi, It seems fullscreen support broke, somewhere since 1.39.13, probably with version_21 and the 2.0.10 merge (I don't see fullscreen-related commits on the Emscripten side). Now the browser doesn't go fullscreen at all, this can be checked quickly with the simple app in original post: the application believes it is fullscreen but the browser doesn't do anything. |
I just checked with latest SDL2 and it's still working here (Firefox/Linux), my Emscripten may be a little outdated though... Edit: Yeah, 1.39.12 (82e8463b8ac0d17d0b640ce834cb938b7609d14c) (had forced port to latest commit for testing something else) |
Hi, how do you recommend testing with the latest SDL2? |
bisect says Emscripten broke it in emscripten-core/emscripten@852ca4e |
Hi,
I'm trying to fix long-standing issues with fullscreen in my RenPyWeb port.
(Btw, I'm not doing anything with the "Fullscreen" button from the default shell.html, which seems not to play well with SDL2.)
I'm doing tests with a simple app (https://gist.github.com/Beuc/0ab96af2fde381dd40d818f6b13450c0) where 'F' toggles fullscreen at the SDL2 level (SDL_SetWindowFullscreen). Initial size is 800x600, my resolution is 1920x1080.
Results:
I need to investigate further (possibly with a GL app) but I wanted to share my initial results (wrong callback parameters, wrong size reset, concurrency issue(s?)).
The text was updated successfully, but these errors were encountered: