| Summary: | SDL window restore SDL_VIDEORESIZE event issue... | ||
|---|---|---|---|
| Product: | SDL | Reporter: | cjj_009 |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.14 | ||
| Hardware: | x86 | ||
| OS: | Windows Vista | ||
| Attachments: |
Simple C++ openGL/SDL program to demonstrate SDL_VIDEORESIZE issue
Proposed patch for SDL_resize.c |
||
|
Description
cjj_009
2009-12-14 20:32:35 UTC
Created attachment 502 [details]
Proposed patch for SDL_resize.c
The width and height values stored in SDL_VideoSurface are the sizes of the video surface when it was created. So, when the window is rezised back to its creation size, the following condition will make the SDL_PrivateResize function stop, and the video resize msg won't be queued.
if ( ! SDL_VideoSurface ||
((w == SDL_VideoSurface->w) && (h == SDL_VideoSurface->h)) ) {
return(0);
}
I'm okay with applying this patch, but be aware that the expected response to a resize message is that you call SDL_SetVideoMode() again with the new mode. This signals SDL that you're expecting the new size, and there may be other problems if you don't do this. The patch is in, thanks! http://hg.libsdl.org/SDL/rev/f56b95794ac8 |