Haiku-SDL 1.3: Freeing bits

Do the bits stored by SDL_PublicSurface or whatever it is ever get freed by
SDL?

This is cleaned up during SDL_Quit().

(…which calls SDL_VideoQuit(), which calls SDL_DestroyWindow() on
every remaining window, which calls SDL_FreeSurface() on the pointer
that was eventually stored in SDL_PublicSurface).

–ryan.On 8/9/11 11:09 PM, Nathan Heisey wrote:

Do the bits stored by SDL_PublicSurface or whatever it is ever get freed
by SDL?

I noticed that for SDL_PublicSurface, if we are in OpenGL mode, the
pixels will be set to NULL, in the existing test suite. Haiku has a
fullscreen hotkey that causes problems; SDL_compat.c functions called
from here produce a segmentation fault when you try to change to or
from fullscreen. Should the hotkey be disabled? Is there a newer
test suite available that I can use instead?

Where does it segfault? Maybe just check for NULL there?

–ryan.On 8/10/11 2:23 PM, Nathan Heisey wrote:

I noticed that for SDL_PublicSurface, if we are in OpenGL mode, the
pixels will be set to NULL, in the existing test suite. Haiku has a
fullscreen hotkey that causes problems; SDL_compat.c functions called
from here produce a segmentation fault when you try to change to or
from fullscreen. Should the hotkey be disabled? Is there a newer
test suite available that I can use instead?

Where does it segfault? Maybe just check for NULL there?

The segfault occurs in SDL_WM_ToggleFullScreen(), defined in
SDL_compat.c, when it tries to copy bits from the src surface (which
is NULL, because SDL_SetVideoMode sets it to NULL when it realizes the
surface is an OpenGL surface). I guess I could have it check for NULL
there.

The segfault occurs in SDL_WM_ToggleFullScreen(), defined in
SDL_compat.c, when it tries to copy bits from the src surface (which
is NULL, because SDL_SetVideoMode sets it to NULL when it realizes the
surface is an OpenGL surface). I guess I could have it check for NULL
there.

It’s likely no one’s tried that path with OpenGL yet.

Even without compat mode: SDL_WM_ToggleFullScreen() in SDL 1.2 only ever
worked on X11. I wouldn’t waste a lot of time on it.

–ryan.