Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Running without focus

Credits go to Marco Radaelli and ReyBrujo for helping out!
This thread is locked; no one can reply to it. rss feed Print
Running without focus
23yrold3yrold
Member #1,134
March 2001
avatar

I think I know the answer to this one already, I'm just kind of hoping I'm wrong. :P Got an Allegro program running in windowed mode, animation runs in the background ... I click on another window and all animation ceases (as is expected). Is there a way to get the program to be constantly running aund refreshing the window even without focus, or do I need to get all Win32 on it?

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Marco Radaelli
Member #3,028
December 2002
avatar

23yrold3yrold
Member #1,134
March 2001
avatar

Doesn't seem to work as advertised ... I'm to use SWITCH_BACKAMNESIA, yes? No effect. Should I be calling it anywhere in particular, like before or after set_gfx_mode()?

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

ReyBrujo
Moderator
January 2001
avatar

For Windows, you need to call it after setting the graphics mode.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

23yrold3yrold
Member #1,134
March 2001
avatar

You win. :D Works perfectly now; thanks.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

vixinu
Member #7,343
June 2006
avatar

what about MacOS X (10.4.6)(G4) or Linux (PPC)

ReyBrujo
Moderator
January 2001
avatar

You should use both, SWITCH_BACKAMNESIA and SWITCH_BACKGROUND. Which one works depends on your operative system and whether the application is fullscreen or just windowed.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

CGamesPlay
Member #2,559
July 2002
avatar

They work the same way on those platforms.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Go to: