| Summary: | Switch from resizable to not resizable does not work. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sean Farrell <sean.farrell> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P1 | ||
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
Fixed in svn revision #3168, thanks! --ryan. |
If you try to set a video mode with no resizable but the previous mode is resizable the the flag is not set. (Although the window behaves as expected.) Here code that illustrates the problem: /* * This program displays a deficiency in SDL. * * If the video mode was once set resizable it is impossible to set the mode * not to be resizable. * * compile: gcc `sdl-config --cflags --libs` resizable.c */ #include "SDL.h" #include "stdio.h" #include "assert.h" void print_resizable() { SDL_Surface* screen = SDL_GetVideoSurface(); assert(screen); if ((screen->flags & SDL_RESIZABLE) == 0) { printf("screen is not resizable\n"); } else { printf("screen is resizable\n"); } } int main() { SDL_Init(SDL_INIT_VIDEO); SDL_SetVideoMode(800,600,0,0); print_resizable(); SDL_Delay(10000); SDL_SetVideoMode(800,600,0,SDL_RESIZABLE); print_resizable(); SDL_Delay(10000); SDL_SetVideoMode(800,600,0,0); print_resizable(); // this reports a error SDL_Delay(10000); SDL_Quit(); }