We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 253 - libsdl not working with svgalib driver for savage card
Summary: libsdl not working with svgalib driver for savage card
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.10
Hardware: Other Linux
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-17 17:45 UTC by Pablo De Napoli
Modified: 2007-02-20 15:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo De Napoli 2006-06-17 17:45:14 UTC
Libdsl-1.2.8 doesn't work for me in svga mode [i.e. using
svgalib driver] (yes under X)

Libsdl-1.2.7 used to work (1.2.8 not), but it failed to 
compile using gcc-4.1.1 (I've have succeded in compiling it
with a patch from Gentoo portage (see http://www.gentoo.org/cgi-bin/viewcvs.cgi/media-libs/libsdl/files/1.2.8-gcc4.patch?rev=1.1&view=log),   but it didn't work either)

I'm currently using
binutils-2.16.1
gcc-4.1.1
glibc-2.4
nasm- 0.98.39 (I think it is used to compile SDL)
svgalib-1.9.24
(I'm reporting all these, because I think that gcc/binutils/nasm
somehow misscompiles Libsdl 1.2.7)
[on an x86 (athlon) Gentoo linux host]

CFLAGS="-03 -march=athlon -funroll-loops -pipe -fomit-frame-pointer"

My graphic card identifies itself as:

01:00.0 VGA compatible controller: S3 Inc. ProSavage KM133 (rev 03)

Under xorg-X11 I'm using the driver Savage.

I've tested several applications and none worked: mplayer, 
frozen bubble (the screen fills with stranges colors and I can see
nothing); even the following simplest example from the tutorial
failes to restore the text mode when returning:

#include <stdlib.h>
#include <SDL/SDL.h>

main(int argc, char *argv[])
{
    if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
        fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
        exit(1);
    }
    atexit(SDL_Quit);

} 

This problem is very difficult to test, because the machine 
hangs every time that I test something.

Please help me!.

best regards,
Pablo De Napoli
Comment 1 Pablo De Napoli 2006-06-17 17:48:07 UTC
libsdl 1.2.10 didn't work either.
Comment 2 Sam Lantinga 2006-06-20 02:00:02 UTC
Is there any chance I can log in remotely, or you can loan me the video card?  I have no idea what the problem might be...
Comment 3 Ryan C. Gordon 2007-02-12 04:15:28 UTC
Just so I'm understanding this correctly, you're using SDL's svgalib driver while running an X server? Is there any reason you can't just use SDL's X11 driver?

No SDL developers have hardware that matches the machine mentioned in this problem, but it's very likely that the svgalib driver in SDL is just broken and it's not Savage-specific, as no one has touched that code in years.

We probably won't be able to do much here, as you can tell by the bug being open so long. I'd recommend using the X11 backend...or if you absolutely must avoid X, try the fbcon backend. The svgalib code should probably be removed from SDL as unmaintained.

Flagging this bug as WONTFIX. If you must use svgalib, use SDL 1.2.7. Sorry.

--ryan.

Comment 4 Pablo De Napoli 2007-02-20 08:44:19 UTC
No, the problem was not under X, but in the linux 
console.

I've solved the problem by disabling the framebuffer
device (i.e.: by using the "-fbcon -directfb" 
use parameters, that causes the parameters
--enable-video-fbcon=no --disable-video-directfb to
be passed to configure)

Then libsdl selects the svgalib driver, at it works
fine.

No everything works fine.
Comment 5 Ryan C. Gordon 2007-02-20 15:55:56 UTC
Ah, I see...the problem wasn't the svgalib driver in SDL, it was that SDL favored its fbcon driver, which didn't work correctly on your system.

(This can be forced at runtime if you set this environment variable:

   SDL_VIDEODRIVER=svgalib

Then it will choose that driver, regardless of what else is available to SDL, assuming svgalib support was built into SDL.)

Glad it's working for you now!

--ryan.