| Summary: | SDL_SetVideoMode will fail when called twice if returned surface is freed with SDL_FreeSurface | ||
|---|---|---|---|
| Product: | sdl12-compat | Reporter: | Dario <dankospam> |
| Component: | everything | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Dario
2019-03-21 11:50:31 UTC
Ah, interesting...you aren't supposed to call SDL_FreeSurface() on the return value from SDL_SetVideoMode(), but I see that SDL 1.2 checks for this case and returns immediately if trying to free the screen surface. I'll fix that. --ryan. Interesting, that is exactly what I did to solve it. You are right in any case, I checked the SDL 1.2 documentation and it says the surface should not be freed. So I guess I will have to report that too to the other project :). I can also advance that, when adding the VideoSurface12 check and returning on the SDL_FreeSurface I encountered that when switching from FullScreen to Windowed mode, the game was not correctly scaled: it is as if the game stayed "large" but the area was clipt to the size of the window screen. Regarding the later, I will investigate further and report when I know more. > Regarding the later, I will investigate further and report when I know more. Please do, and open a separate bug for it so we don't forget to fix it! :) As for this bug: fixed in https://hg.libsdl.org/sdl12-compat/rev/f4f3bf9e36e1, thanks! --ryan. |