Using SDL with XFree86 under Linux, I’ve noticed that SDL_ListModes()
can return -1. It seems to do so in the case where any dimensions would
be acceptable.
The docs mention returning NULL (if no modes are available with the
specified pixelformat) but not -1.
Is this an intended (but as-yet undocumented) behaviour?
Or is it just an extra feature of the X11 code?
Using SDL with XFree86 under Linux, I’ve noticed that SDL_ListModes()
can return -1. It seems to do so in the case where any dimensions would
be acceptable.
The docs mention returning NULL (if no modes are available with the
specified pixelformat) but not -1.
Is this an intended (but as-yet undocumented) behaviour?
Or is it just an extra feature of the X11 code?
Neither, it’s indented but misdocumented. The html docs say:
Returns NULL if there are no dimensions available for a
particular format, or if any dimension is okay
for the given format.
but this should probably be
Returns NULL if there are no dimensions available for a
particular format, or (SDL_Rect **)-1 if any dimension is okay
for the given format.
I imagine other windowed targets behave similarly.
(Martin, remember to fix this in the new docs, please!)
Using SDL with XFree86 under Linux, I’ve noticed that SDL_ListModes()
can return -1. It seems to do so in the case where any dimensions would
be acceptable.
The docs mention returning NULL (if no modes are available with the
specified pixelformat) but not -1.
Is this an intended (but as-yet undocumented) behaviour?
Or is it just an extra feature of the X11 code?
for greates documentation see SDL headers–
Linux = "The Tecnological Evolution"
Linux + Overclock = “The Art of Racing”