• Advertisement

Archived

This topic is now archived and is closed to further replies.

When game is active again (after alt+tab)

This topic is 5363 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've ran into quite a problem. I use this code to handle Alt+Tab:
    case WM_ACTIVATEAPP:
        if( g_Steint.isInitialized() )
            wParam ? g_Steint.onFocus() : g_Steint.onFocusLost(), WaitMessage();
        break;    
Currently, onFocus() only reacquires input, which works, but everything goes black. I guess this is cause all textures are lost. Now, since My game is OO I'm gonna have classes representing objects, so some objects will have their own texture. This means I have to have a restoreTexture() method on every object and then call that method on every object in my game. That is not a comfortable solution. I could have a class for texture loading and then just pass pointers to the gameclasses so they know what texture they should use. Then have a single restoreTextures() method on that texture class. However, that is not a comfortable solution either... How do you solve texture restoring after Alt+Tab in your game? NOTE: Steint is the name of my game... [edited by - Enselic on August 17, 2003 1:06:59 PM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement