Android restore fullscreen after resume#15218
Android restore fullscreen after resume#15218Farmer-Markus wants to merge 1 commit intolibsdl-org:SDL2from
Conversation
|
@1bsyl, does this seem correct? If so, should we do something similar in SDL3? |
|
If we do this in SDL2, this has also to be done in the non-block function too. I wanted to tested it ... but I couldn't get SDL2 compiled on Android ... On SDL3, it seems to works correctly both with RPC branch and main. Not sure why SDL2 has an issue... |
SDL2 can create a gradle project using build-scripts/androidbuild.sh. |
|
with SDL3, I have a script that does: mkdir -p build cmake --build build --target SDL3-jar can this also compile for SDL2 ? |
No, apks are only in SDL3. |
|
ok, thanks! So I built SDL2 and testsprite2 with: and added this to go to fullscreen And it seemed to work when resuming. So not sure why adding this patch ... |
I'll try the test app but the Issue started after changing the targetSDK version to 36. Thr bug happens on my samsung phone(also after switching to a custom android rom) and sometimes in the android studio emulator with an sdk 36 phone but not with an 28 sdk phone. This might be a newer android problem. I'll try the test app and post the results here |
Found the real reason this won't work on my app. I've ported a game to android which uses
Should I change the commit to add the Lines 1347 to 1355 in e0307aa |
|
I can't tell. Not sure if you still consider the patch relevant, if so you need to add the same thing for the non-block function. |
|
@1bsyl I think my new commit is the best approach. Android does not support resolution changes anyway so why not just use desktop full screen, as intended |
|
@Farmer-Markus |
Description
Just a small fix to reapply the full screen mode after resuming if full screen flags are set.
Always had issues when android would send an window hide event to the sdl java activity which would then exit full screen mode and won't restore it after resuming.