Sign in to follow this  
jianghongbo

what kind of manipulation can cause device lost?

Recommended Posts

Quote:
From dx8 SDK
By design, the full set of scenarios that can cause a device to become lost is not specified. Some typical examples include loss of focus, such as when the user presses ALT+TAB or when a system dialog is initialized. Devices can also be lost due to a power management event, or when another application assumes full-screen operation. In addition, any failure from Direct3DDevice8.Reset puts the device into a lost state.

I opened my current project (which runs in Windowed mode) and did all the stuff. None of it lost the device.

Since in windows mode the d3ddevice doesn't have direct control over the monitor, changes in the window state are passed through the window handle and.. handled? Or something like that. Someone more experienced can cover from here if you want an explanation.

Share this post


Link to post
Share on other sites
Quote:
Original post by Namethatnobodyelsetook
Try ctrl-shift-esc. If that doesn't do it, try ctrl-alt-del. Run full-screen and alt-tab away from your app.

Well, if you run it in fullscreen then, yes, of course you'll lose the device.
Quote:
(window mode).

Share this post


Link to post
Share on other sites
Mushu, sorry if my reply wasn't perfect. Anyway, I loaded the DX help, and typed "lost device" into the index. A page called "Lost Devices" contains this text: "By design, the full set of scenarios that can cause a device to become lost is not specified. Some typical examples include loss of focus, such as when the user presses ALT+TAB or when a system dialog is initialized. Devices can also be lost due to a power management event, or when another application assumes full-screen operation. In addition, any failure from IDirect3DDevice9::Reset puts the device into a lost state." So, instead of pointing out that I missed the words "windowed mode", you could have noted that I provided two other relevant answers first. The original poster can probably have filtered out that last one on his own, giving your post absolutlely no purpose.

To the OP: If you're trying to find each possible case, as the docs mention, there is no complete list, nor should your app rely on responding to each specific situation. If you're just trying to test your lost-device code, popping up the task manager should do the trick.

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