No SDL app seems to be able to set the video mode for me when I try to use
DGA, at any depth.
Can you use the debugger to trace through where it sets up the video modes?
[hercules at coral test]$ su
Password:
[root at coral test]# export SDL_VIDEODRIVER=dga
[root at coral test]# gdb testvidinfo
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “i386-redhat-linux”…
Breakpoint 1 at 0x8048755: file testvidinfo.c, line 15.
(gdb) r
Starting program: /home/hercules/public_cvs/SDL-1.1/test/testvidinfo
Breakpoint 1, main (argc=1, argv=0xbffffb64) at testvidinfo.c:15
15 if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
(gdb) b DGA_VideoInit
Breakpoint 2 at 0x4004a28d: file SDL_dgavideo.c, line 267.
(gdb) c
Continuing.
Breakpoint 2, DGA_VideoInit (this=0x804a018, vformat=0xbffffab0)
at SDL_dgavideo.c:267
warning: Source file is more recent than executable.
267 DGA_Display = XOpenDisplay(display);
(gdb) list
262 int i, num_modes;
263
264 /* Open the X11 display /
265 display = NULL; / Get it from DISPLAY environment variable /
266
267 DGA_Display = XOpenDisplay(display);
[lines snipped for brevity]
313
314 / Open access to the framebuffer /
315 if ( ! XDGAOpenFramebuffer(DGA_Display, DGA_Screen) ) {
316 SDL_SetError(“Unable to map the video memory”);
317 XCloseDisplay(DGA_Display);
318 return(-1);
319 }
320
321 / Query for the list of available video modes */
(gdb) list
322 modes = XDGAQueryModes(DGA_Display, DGA_Screen, &num_modes);
323 for ( i=0; i<num_modes; ++i ) {
324 if ( (modes[i].visualClass == PseudoColor) ||
325 (modes[i].visualClass == TrueColor) ) {
326 DGA_AddMode(this, modes[i].bitsPerPixel,
327 modes[i].viewportWidth,
328 modes[i].viewportHeight);
329 }
330 }
331 UpdateHWInfo(this, modes);
(gdb) b 322
Breakpoint 3 at 0x4004a466: file SDL_dgavideo.c, line 322.
(gdb) c
Continuing.
Breakpoint 3, DGA_VideoInit (this=0x804a018, vformat=0xbffffab0)
at SDL_dgavideo.c:322
322 modes = XDGAQueryModes(DGA_Display, DGA_Screen, &num_modes);
(gdb) n
323 for ( i=0; i<num_modes; ++i ) {
(gdb) p num_modes
$1 = 31
(gdb) p modes
$2 = (XDGAMode *) 0x804b678
(gdb)
See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software