App does not draw after Screensaver
BlitzMax Forums/BlitzMax Programming/App does not draw after Screensaver
| ||
Hi guys, I must have missed some thread but could someone please tell me how to resume drawing after screensaver? Right now, if I have the program running and screensaver kicks in or system locks, it will not resume drawing commands or mouse input. It will terminate just fine. Please excuse me if this has been covered, I just can't find the solution. Thanks. P.S. I am using WinXP Pro. |
| ||
You should really disable screensavers.. when the screensaver kicks it, focus switches to the screen saver, screen savers tend to create opengl or dx fullscreen displays..adjusting pixel formats etc, when this happens, your own rendering context will be lost/destroyed..to recover, you need to know when your app has become active again..at which point you would create a new display + reload all your images.. Its not pretty...DISABLE your screensavers. |
| ||
I understand what happens. The problem is I can not force customers to do the same. So the question to the community/devs is, how can I "trap" the switching and then re-create the device? Am I not finding a command that notifies me when the app has lost context? |
| ||
BlitzMax is now supposed to do this automatically. I don't know if it's improved in 1.16 but in my experience with 1.14, it doesn't always work. |