|
|
| Why allegro pause the game if the window lost focus? |
|
davidcorns
Member #11,644
January 2010
|
Hi all, May I ask why allegro pause the game if the window lost focus?? I use a while loop for running the game. Thanks |
|
Evert
Member #794
November 2000
|
|
davidcorns
Member #11,644
January 2010
|
Thanks for your reply. I have tried set_display_switch_mode(SWITCH_BACKGROUND) under window xp, but still when the window lose focus, the sound delay to play and the whole game stop. What's going wrong? |
|
Timorg
Member #2,028
March 2002
|
A couple of questions.. Not all modes are supported on all platforms, I can only suggest that you setup your code so that you try the variety of background modes in the most preferable order. Then you either dont use video bitmaps, or be prepared to reload them when you get the display switch callback. (set_display_switch_callback()) If you solve the problem in this way, it will work on more platforms without you having to modify your code. ____________________________________________________________________________________________ |
|
davidcorns
Member #11,644
January 2010
|
Thanks for your reply. >What platfrom are you running the application on? >What is the return value of set_display_switch_mode()? Thanks |
|
ImLeftFooted
Member #3,935
October 2003
|
Quote: Returns -1 if the requested mode is not currently possible. .... Quote:
SWITCH_BACKAMNESIA
|
|
davidcorns
Member #11,644
January 2010
|
Thanks you all. Finally, I found that while it did not work even if I had used set_display_switch_mode(SWITCH_BACKGROUND) under window. It is because I wrote this code before "set_gfx_mode" = = Anyway, thanks again |
|
|