pouët.net

directdraw is evil

category: general [glöplog]
 
So I've been messing with ddraw and stuff lately.. everything works fine, except whenever the user presses alt-tab, does something else and then tries to get back onto the demo then everything explodes. I've added handlers for WM_ACTIVATE and stuff.. it's a crash, not just an infinate loop or anything, because even when I do ctrl-alt-del it reports it as "not responding" and has to eat it or something to make it close. Normally it'll just get WM_QUIT and then close.. what's up with it? I'm sure it's something utterly obvious, heh...
added on the 2002-03-07 22:45:36 by golrien golrien
when the user alt+tabs away you loose your surface, and thus has to restore it, in your SwapPage-routine you can add something like:

Code: if(mySurface->IsLost()) { mySurface->Restore(); // add some checking here, try // again later if it fails } mySurface->Lock(.....


se the SDK for details
added on the 2002-03-07 23:59:21 by jar jar

login