Hi all,
I’m currently having a problem trying to get the SVGAlib output device
working on SDL 1.2.2.
It appears that the code to detect whether someone is using SVGAlib
1.4.3 or one of the 1.9.x development versions isn’t working completely
proper. If you’re in X when you try to run a SDL program using the
SVGAlib output driver, it’ll report that no device can be found. I’ve
narrowed this is caused by the virtual terminal checking code in
SDL_svgavideo.c:
/* See if we are connected to a virtual terminal */
console = STDIN_FILENO;
if ( console >= 0 ) {
struct stat sb;
struct vt_mode dummy;
if ( (fstat(console, &sb) < 0) ||
(ioctl(console, VT_GETMODE, &dummy) < 0) ) {
console = -1;
}
}
If you’re in X, the ioctl(console, VT_GETMODE, &dummy) command will
return -1 and cause
return(((svgalib2 != -1) || (geteuid() == 0)) && (console >= 0));
to return 0 (i.e. failure).
In my case when I’m root and in X, the following would be set:
svgalib2 = -1
geteuid() = 0
console = -1
Which would cause the return function to look like this:
return (0 || (1 && 0));
However, if I’m in one of my ttys it would look like the following and
start svgalib:
return (0 || (1 && 1));
That’s all I’ve been able to figure out so for, but I’m still not
getting any graphics on the screen like I do using the X driver or the
aalib driver… I’m going to keep looking but if anyone happens to find
more fixes, I would like to see them.
Bryan–
http://www.bokeoa.com/ | @Bryan_Stillwell
GPG fingerprint: 33F7 44F2 8612 E02F 8DE8 97FB 621E 8A36 6DC1 32AF
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20011030/e87957b1/attachment.pgp