Mirage Engine
DD.RestoreAllSurfaces - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: DD.RestoreAllSurfaces (/showthread.php?tid=1109)



DD.RestoreAllSurfaces - William - 18-07-2007

You get a error when entering counter strike while having a ms game open. This line:
Code:
DD.RestoreAllSurfaces

How can that be fixed?


Re: DD.RestoreAllSurfaces - Dragoons Master - 19-07-2007

In Vanilla MSE, this is done like this:
Code:
' Check if we need to restore surfaces
        If NeedToRestoreSurfaces Then
            DD.RestoreAllSurfaces
            Call InitSurfaces
        End If
In my game, I load the Surfaces again before I do the Restore, I'm not sure why I do this, I did this a long ago and there is no commentary at this part of the code of my game... Here it is:
Code:
If NeedToRestoreSurfaces Then
            Call AddText("Espere um momento...", Red)
            Call InitSurfaces(True)
            DD.RestoreAllSurfaces
            Call AddText("Pronto.", White)
        End If
Ignore the two AddText()...
This parameter True is a thing I did just so if it is true no window will be show when calling InitSurfaces, since there is needed a few when the game really starts.
I'm not sure if this can help you out with exactly this problem but maybe it will. Good luck!
BTW: AVATAR RLZ!


Re: DD.RestoreAllSurfaces - Robin - 19-07-2007

Didn't Verrigan post a fix for this... how it messes up if your resolution changes and the such?


Re: DD.RestoreAllSurfaces - William - 19-07-2007

Robin Wrote:Didn't Verrigan post a fix for this... how it messes up if your resolution changes and the such?
He told me he did but he didnt know were it was. Would just feel good if this bug could get out of my source.


Re: DD.RestoreAllSurfaces - Matt - 19-07-2007

Open your game, login. Wait for your screensaver to start. Cancel the screensaver, look at your game.

No error, but no blitting either. O_o


Re: DD.RestoreAllSurfaces - Robin - 19-07-2007

Sure you don't have a local on error resume next?


Re: DD.RestoreAllSurfaces - Matt - 19-07-2007

Robin Wrote:Sure you don't have a local on error resume next?

Me? No.. Not that I know of.


Re: DD.RestoreAllSurfaces - Dragoons Master - 19-07-2007

Ctrl+F it!


Re: DD.RestoreAllSurfaces - Robin - 19-07-2007

I was just wondering if that's why an error popped up.

I'll look into it once I've finished this commission.


Re: DD.RestoreAllSurfaces - William - 21-07-2007

Verrigan Wrote:I put a fix for this in KoC... (after posting the bug fix, that somehow never migrated over here...)

Anyways.. It just checked for errors.. If there was an error, it popped up a status message saying something like "Please Wait.. Restoring Surfaces.." which would get displayed while the screen saver was open, and then again when the screen saver was closed.

Anyways.. Maybe I'll rewrite the bug-fix one of these days.. I have to work this weekend, so probably not for at least a week.
No hurry, I dont need it for another month at least or so. And its not that big of a bug, just dont like the idea of knowing of a bug and not being able to do something about it.