How to tell if rendering/accessing SDL_Renderer is safe on Android / bogus minmize/background event in side by side?


#1

On Android in side-by-side mode, I get window minimized and app into background events.

This would normally indicate that 1. the app is not visible anymore (so rendering is pointless), 2. the OpenGL context/SDL_Renderer is not safe to touch in any way without causing corruption (as I have been informed in https://bugzilla.libsdl.org/show_bug.cgi?id=4578 ).

I’m pretty sure NONE of these two things are true for side by side, since other apps when not focused in side by side render & update just fine, so both drawing and using the OpenGL context works for them.

Is this an SDL2 bug? Why would it tell me the app is in background, and the window is minimized(!) when it’s jut a simple window focus loss and the app isn’t truly in background? Because this really is a bit of an issue for side by side


#2

After more thinking I can’t come up with any good reason why just from a pure API user point of view this would make any sense, so I filed a bug: https://bugzilla.libsdl.org/show_bug.cgi?id=4584

(I may have missed something though, so I’m curious about responses)


#3

Hi
Try this https://stackoverflow.com/questions/26774728/sdl2-two-displays-two-windows-and-fullscreen-mode


#4

@rmg.nik check out the ticket, it’s a known issue apparently. Also the window is not ACTUALLY minimized, and the problem isn’t the minimize event per se but the background one and that I can’t redraw afterwards.