We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1685

Summary: Black screen for fullscreen opengl rendering when switching from non opengl fullscreen
Product: SDL Reporter: Emmanuel Anne <emmanuel.anne>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED ENDOFLIFE QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: youpla.b
Version: 1.2.15   
Hardware: x86   
OS: Windows 7   
Attachments: modified version of testgl.c

Description Emmanuel Anne 2013-01-09 13:40:24 UTC
Created attachment 1010 [details]
modified version of testgl.c

I am surprised not to find this bug already reported, it's very easy to hit it when trying to use a non opengl gui with sdl. It's windows only apprently, I saw it on vista too, doesn't happen on linux.

To reproduce, the easiest way is to change the testgl program and just insert a call to SDL_SetVideoMode without opengl after the normal SDL_SetVideoMode and then another call to SDL_SetVideoMode with opengl this time.
Then run it with testgl -fullscreen -sync -> black screen.
It happens only with the directx video driver :
export SDL_VIDEODRIVER=directx

The screen is updated again if you tab out from the application to the desktop and then come back to the application with alt-tab again. But I didn't find any workaround without this manual intervention, maybe switching to the dib driver when going opengl fullscreen could help, I didn't try that yet, it's my next test, but it's probably not very convenient anyway !

The program works normally when windowed or when run in linux.

I attach a modified version of testgl.c for reference...
Comment 1 Damien 2013-02-05 05:47:36 UTC
I *think* I have the same bug, one that involves black screen on fullscreen anyway.

I must add hat it does indeed affect Linux: I have this bug while using Dosbox 0.74 and Exult 1.5.0svn. On these two I am able to go fullscreen without problem but the bug appears when I try to stretch the original resolution. As you may know both these programs "emulate" older games with low resolutions such as 320x200. Using the original resolution ( or multipliers 1x, 2x, etc.) allows for fullscreen with blackboxing, but as soon as I try to set the software to strech the original resolution to fit my screen, I have a black screen.

These are the parameters I'm using if you want to reproduce the bug under Linux:

dosbox.conf : fullresolution=1024x600 (native resolution); output=overlay
I have dosbox first screen good, but as son as it starts a game and flickers to another resolution I get a black screen.

exult: displaymode=1024x600; GameArea=auto; fillmode=fill
Once the game is properly set up, with a few killall to go back to the desktop, the game starts and plays fullscreen fine.

I'm using Ubuntu 12.04 with graphic drivers from http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu .
The computer is an Asus Eee901 with Intel Atom n270 and integrated GMA950.
Comment 2 Ryan C. Gordon 2015-08-25 09:38:24 UTC
Hello, and sorry if you're getting several copies of this message by email, since we are closing many bugs at once here.

We have decided to mark all SDL 1.2-related bugs as RESOLVED ENDOFLIFE, as we don't intend to work on SDL 1.2 any further, but didn't want to mark a large quantity of bugs as RESOLVED WONTFIX, to clearly show what was left unattended to and make it easily searchable.

Our current focus is on SDL 2.0.

If you are still having problems with an ENDOFLIFE bug, your absolute best option is to move your program to SDL2, as it will likely fix the problem by default, and give you access to modern platforms and tons of super-cool new features.

Failing that, we _will_ accept small patches to fix these issues, and put them in revision control, although we do not intend to do any further official 1.2 releases.

Failing that, please feel free to contact me directly by email (icculus@icculus.org) and we'll try to find some way to help you out of your situation.

Thank you,
--ryan.