SDL and SVGALIB

Hello,

How do I use SDL with svgalib? I have some X applications that work well I
now need to do the same for an svgalib platform.

Thanks, Ian

Hello,

How do I use SDL with svgalib? I have some X applications that work well I
now need to do the same for an svgalib platform.

With a correctly setup SDL library, it’s as simple as :
export SDL_VIDEODRIVER=svgalib
./my_program

The SDL doc has the different values that can be used for the SDL_VIDEODRIVER variable :
http://sdldoc.csn.ul.ie/sdlenvvars.php

Stephane

With a correctly setup SDL library, it’s as simple as :
export SDL_VIDEODRIVER=svgalib
./my_program

Note that an SVGAlib program needs to be suid-root in order to run.
Also note that you can’t launch an SVGAlib program from an xterm; you
need to run it from an linux console.

These facts actually make the use of the SDL_VIDEODRIVER env variable
redundant. You can just run the program directly, and SDL will use
whichever video output is available:

  • If run inside of X, SDL will use the X driver.
  • if run from a text console & suid-root, SDL will use the SVGAlib driver.
  • If run from a text console & not suid-root, SDL will use the AAlib driver.

(Assuming of course you have an SDL library that supports all three drivers.)

b

while this was true with svgalib-1.4.x this is certainly not true with
svgalib-1.9.x
that’s what the svgalib_helper kernel module is for
-mikeOn Tuesday 13 July 2004 05:16 pm, Brian Raiter wrote:

Note that an SVGAlib program needs to be suid-root in order to run.
Also note that you can’t launch an SVGAlib program from an xterm; you
need to run it from an linux console.