| Summary: | detecting lost surfaces with SDL's DirectDraw driver | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sam Lantinga <slouken> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.0 | ||
| Hardware: | x86 | ||
| OS: | Windows (All) | ||
|
Description
Sam Lantinga
2006-01-27 02:21:33 UTC
Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL. --ryan. Ugh, this is a big pain. If we lose the primary surface, IDirectDrawSurface3_Restore() fails until the resolution is changed back to the original, so it's not just a question of calling it in a loop with some sleep calls thrown in until it passes. Likely we'd have to tear down the surface and create a new one, and probably take into account the possibility that the pixel format might change. Also, since we want to restore the data from an internal DirectDraw surface, that's probably lost too, anyhow. I don't really want to add a DirectDraw-specific event to SDL, but the original poster is right...the simplest way to handle this is to tell the app to call SDL_SetVideoMode() again and recreate the contents of the screen surface. What a mess. I'm flagging this as WONTFIX, since there's really no good solution here in 1.2 and it's less relevant with windib becoming primary (this problem is directx specific)...and it wouldn't hit most people anyhow. If anyone has a better idea, please reopen the bug and discuss it. --ryan. |