I have been doing some research into this problems, and have found some solutions posted, but none are working for me...
Also I am using DarkGDK.NET.
If I hit control-alt-delete while the game is running I get an AccessViolationException here...
Here is my current game loop...
First I create a memoryFlushSprite image that is a small 1x1 pixel that is pasted every loop. If this image is lost, it should fall into the line where it retrieves the image from the MediaHandler class again. But it is not ever running into that line.
DarkGDK.Basic2D.Image memoryFlushSprite = MediaHandler.flushSprite;
/* Main game loop */
while (DarkGDK.Engine.LoopGDK)
{
/* Now in the main part of the loop (the actual game) */
gGod.runGame();
//trying to check for video flush, not working
if (DarkGDK.Display.ScreenInvalid)
{
if ((memoryFlushSprite.Width == -1 && memoryFlushSprite.Height == -1))
memoryFlushSprite = MediaHandler.flushSprite;
}
/* Sync everything up */
DarkGDK.Core.Sync();
}
When the memoryFlushSprite image is lost, its Width/Height = -1, so I tried checking for that too. Even wrapping the DarkGDK.Core.Sync() in a try/catch doesn\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'t work.
Does anyone know how I can find when ctrl-alt-delete was clicked so I can reload my assets? Thanks!