Sign in to follow this  
_Phalanx_

Quick Windows message question

Recommended Posts

Have a global flag for "gamePaused", run your game loop whenever the flag isn't set. To set/unset the flag, hook the WM_ACTIVATE message in your Windows loop, setting your paused flag if the WPARAM is set to WA_INACTIVE and unsetting it if WPARAM is WA_CLICKACTIVE || WA_ACTIVE

This will pause your game whenever the game window isn't active and restart it when it is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this