PDA

View Full Version : Full Screen - Win Desktop flickers through?


Phil Steinmeyer
07-29-2005, 01:53 PM
When I launch my game in full screen mode (it changes to 800 x 600), sometimes bits of my Windows desktop flicker 'through' the game - i.e. you can see bits of the windows desktop - the start button and taskbar usually.

It flickers for a bit then usually goes away, but looks bad.

I see this on several test machines. I'm using SDL, software mode.

Any thoughts?

Thanks,
Phil

PeterM
07-30-2005, 07:32 AM
What flags do you pass to SDL_SetVideoMode?

I normally just pass SDL_FULLSCREEN | SDL_ANYFORMAT (not double buffer, not hwsurface) and haven't had any problems.

I also update the display using SDL_Flip(screen), and basically ignore all the SDL_UpdateRect functions.

soniCron
07-30-2005, 11:43 AM
I see this on several test machines. I'm using SDL, software mode. Any thoughts? I've seen this consistently through all my years as a gamer. I was under the impression that it was a bug that simply plagued all DirectX apps; when some windows are fighting to get foreground, they "blink through". I've seen this from animated windows, animated system tray icons, system tray popups, and message boxes. If you figure out what's causing this, please let us know!

Donavon Keithley
07-30-2005, 01:37 PM
Sounds like for whatever reason the window isn't fully covering the screen and/or isn't topmost. D3D and DDraw *try* to make the device window cover the screen when going full-screen exclusive, but don't always succeed.

I don't know SDL but if it's possible, try going into full-screen mode without blitting anything to the screen or flipping surfaces and see what the window looks like. You might have to manually maximize the window and make it top-most (ShowWindow(SW_MAXIMIZE) and SetWindowPos with HWND_TOPMOST). Maybe hit it with a SetForegroundWindow.

It's also a good idea to remove any decorations it might have, like the caption bar and menu. If the app doesn't have exclusive access to the keyboard and mouse, it's possible for these things to still be "alive". What I've done before is force the window style to just WS_POPUP | WS_VISIBLE.

Unlikely in your case but another potential gotcha is specifying a child window for the device window. You of course can't generally cover the screen with a child window.

Phil Steinmeyer
08-03-2005, 07:48 AM
Traced it down - it was sort of an issue of window Z-Order - I was calling SetWindowPos() in the wrong place, which was causing my full screen app to think (in some cases) it was behind other apps.