Game exiting when screensaver/user screen appears...
Hey guys,
I'm having a problem where by my game will exit immediately when a user returns from the windows xp login screen that appears after a screensaver has come up.
I'm using DirectX9 in a window, the problem occurs when say somebody leaves the game, the screensaver will appear after a few minutes, then I'll move the mouse, login again, and I'll see my game's window going grey (i.e. not redrawing), and then simply exiting immediately.
Any ideas?
I've been looking for a fix for months, without any luck...
Modena360
When the screensaves becomes active, your Direct3D device will be LOST(Same happens with ALT+TAB).
You have to catch the DeviceReset/Lost events and re-acquire the device before rendering again. Consult the DirectX API documentation on how to handle the DeviceLost event.
Toolmaker
You have to catch the DeviceReset/Lost events and re-acquire the device before rendering again. Consult the DirectX API documentation on how to handle the DeviceLost event.
Toolmaker
you could also disable the screen saver when then game starts and re-enable it when the game ends.
void ScreenSaver_SetEnabled(bool value){ ::SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, value, 0, 0); ::SystemParametersInfo(SPI_SETLOWPOWERACTIVE, value, 0, 0); ::SystemParametersInfo(SPI_SETPOWEROFFACTIVE, value, 0, 0); return;}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement