Sign in to follow this  
eal

resetting the display

Recommended Posts

hey, i'm trying to get my d3d program to resume if it gets minimized. i'm following the steps below: IDirect3D8 *D3D8OBJ; 1) test if "D3DERR_DEVICELOST" is returned by by "Present()" 2) if so, destroy D3D8OBJ 3) move into a loop until "TestCooperativeLevel()" returns "D3DERR_DEVICELOST" 4) then make a call to "Reset()" so uh... any ideas why it doesn't resume? the program also doesn't minimize at all unless its running at a different resolution than the desktop

Share this post


Link to post
Share on other sites
You don't actually destroy the Direct3D object. Release all device dependent objects (vertex buffer, index buffer, textures) before resetting the device. Then you'll have to reload those objects.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Don't destroy the device! Check TestCooperativeLevel() for D3DEER_DEVICENOTRESET (or something like that) and call IDirect3DDevice9::Reset() then.

Share this post


Link to post
Share on other sites
thanks for the help! (i also found i wasn't running through the message loop while it was minimized). Does anyone know why a program wouldn't minimize if the destop was running at the same resolution as the program?

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