Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android black screen on resume [2.0.4] #2138

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

Android black screen on resume [2.0.4] #2138

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.4
Reported for operating system, platform: Android (All), All

Comments on the original bug report:

On 2016-04-02 10:23:36 +0000, Richard Russell wrote:

Created attachment 2404
Test Case to demonstrate black screen on resume.

Resuming from a suspended state results in a black screen. This only happens when using GLES 1.1 (GLES 2 resumes correctly) and when the render target has been changed using SDL_SetRenderTarget. This problem is new in 2.0.4.

The attached test case demonstrates the issue.

Sylvain Becker has apparently found a fix as follows:

"In the opengles leaf function (in 'src/render/opengles/SDL_render_gles.c'), it appears there is a call to 'GLES_ActivateRenderer' in 'GLES_SetRenderTarget', which is not present in opengles2. When commenting out this 'GLES_ActivateRenderer', it seems to resume fine".

This appears to fix the testcase perfectly, but I don't know whether it could have any undesirable side-effects.

On 2016-04-02 10:26:18 +0000, Richard Russell wrote:

More details can be found at this forum thread:

https://forums.libsdl.org/viewtopic.php?t=11770

On 2017-01-08 10:37:28 +0000, Richard Russell wrote:

This bug is still present in 2.0.5, but the fix described above (commenting out or deleting the call to GLES_ActivateRenderer) again seems to be a complete cure. Can somebody who understands the code form an opinion on whether this modification has any undesirable side-effects, and if not incorporate it in the next release? Thanks.

On 2017-01-08 18:42:35 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL/rev/602fec42fe09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant