When using the X11 driver at least, SDL-1.3 reports only the desktop
mode through SDL_GetNumDisplayModes and SDL_GetDisplayMode. This of
course affects all of the other mode functions.
Also, all mode query functions always report 0 for refresh_rate and
SDL_GetFullscreenMode reports 0 for width and height as well by
default.
SDL_GetClosestDisplayMode uses SDL_GetNumDisplayModes and
SDL_GetDisplayMode, so it only ever reports one mode or fails, except
that the resulting mode has whatever refresh_rate value was passed in.
I expect SDL_SetFullscreenMode is also affected by this.
The dummy video driver doesn’t work either. SDL_VideoInit(“dummy”, 0)
returns non-zero (this is after checking with SDL_GetNumVideoDrivers
and SDL_GetVideoDriver to make sure it’s compiled in).
I could see how some of this might be caused by the operating system
instead of bugs in SDL, so if some of these are working for you please
let me know.
I’m using Linux Mint 7 Gloria x64, which is based on Ubuntu Jaunty
Jackalope 9.04, on an AMD Athlon 64 with nVidia C51G (GeForce 6100).
I’ve attached a batch of test programs you can use to test this stuff.
These are the same programs I’ve used as example code in the SDL-1.3
API documentation ( http://www.libsdl.org/cgi/docwiki.cgi/SDL-1.3/API
).
If it matters, consider them public domain or CC0.
If anyone else wants to work on documenting SDL, please do.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: closestmode.c
Type: text/x-csrc
Size: 979 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090730/879d7e7c/attachment.c
-------------- next part --------------
A non-text attachment was scrubbed…
Name: displaytest.c
Type: text/x-csrc
Size: 943 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090730/879d7e7c/attachment-0001.c
-------------- next part --------------
A non-text attachment was scrubbed…
Name: drivertest.c
Type: text/x-csrc
Size: 705 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090730/879d7e7c/attachment-0002.c
-------------- next part --------------
A non-text attachment was scrubbed…
Name: drivertest2.c
Type: text/x-csrc
Size: 300 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090730/879d7e7c/attachment-0003.c
-------------- next part --------------
A non-text attachment was scrubbed…
Name: modetest.c
Type: text/x-csrc
Size: 794 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090730/879d7e7c/attachment-0004.c