Lost hardware surfaces

Can anyone explain to me a foolproof method for detecting when hardware
surfaces are lost/returned under a MS Windows machine?

I’ve tried the code in the document project example:

    More or less the exact code:
    while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
            while ( SDL_LockSurface(image)) < 0 )
                    SDL_Delay(10);
            SDL_UnlockSurface(image);
    }

I’ve found that my program never leaves the lock surface loop :(, even
though I tab back to my program.

Can anyone help with this problem?

Thanks for any help,

Rob

Take a look at the replies to this post:
http://www.libsdl.org/pipermail/sdl/2001-November/040373.html
They might help you…–
Kylotan

----- Original Message -----
From: serenity@nosubstancesoftware.com (Robert Sadedin)
To:
Sent: Thursday, February 07, 2002 1:27 AM
Subject: [SDL] Lost hardware surfaces

Can anyone explain to me a foolproof method for detecting when
hardware
surfaces are lost/returned under a MS Windows machine?

I’ve tried the code in the document project example:

    More or less the exact code:
    while ( SDL_BlitSurface(image, imgrect, screen, dstrect)

== -2 ) {

            while ( SDL_LockSurface(image)) < 0 )
                    SDL_Delay(10);
            SDL_UnlockSurface(image);
    }

I’ve found that my program never leaves the lock surface loop :(, even
though I tab back to my program.