|
switch back mode for Windows |
Neil Walker
Member #210
April 2000
|
Hello, Is there any reason for this? Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
gnolam
Member #2,030
March 2002
|
I believe it's a DirectX limitation. It's the same for BACKGROUND/BACKAMNESIA BTW - I can't ever remember which one works for which mode, so I always do: if (set_display_switch_mode(SWITCH_BACKGROUND)) { if (set_display_switch_mode(SWITCH_BACKAMNESIA)) allegro_message("Something, somewhere, went wrong somehow.\n"); }
-- |
Neil Walker
Member #210
April 2000
|
Kind of what I do, but why would you want your game to continue when someone switches out? Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Avenger
Member #4,550
April 2004
|
Quote: but why would you want your game to continue when someone switches out? What if it is a simulator or computation program instead? Allegro is not only for games
|
Tobias Dammers
Member #2,604
August 2002
|
...or a (networked) multiplayer game for that matter. If the program pauses when in background, the server will think you client is dead, or you will have to pause all other clients and the server when one client loses focus. Not good. Better keep running, but then without rendering anything (simple hook will do the trick). --- |
Bob
Free Market Evangelist
September 2000
|
Quote: Is there any reason for this? Yes. Microsoft has this idea that whenever your program is switched out from the foreground, has the screen resolution changed, etc, Windows should go ahead and clear all of video memory for you. Once it's done that, it then notifies the driver that hey, you probably want to reset your GPU's context cause I trampled all over it. Then, it notifies the app that all video memory was lost and can't be retrived. Thanks. Apps are supposed to hold on to all surface data in main memory and be able to resend them on notice. This made sense in a world of 1 and 2 MB framebuffers and no hardware acceleration, back in 1992 or so. -- |
|