# HG changeset patch # User Sam Lantinga # Date 1142769916 0 # Node ID 780fd5b61df113699ad086d3d9b17cdf31c69be5 # Parent 0ca607a5d173712c0518dcd65796080fa927bcb9 Fixed bug #89 Date: Sun, 23 Oct 2005 16:39:03 +0200 From: "A. Schmid" Subject: [SDL] no software surfaces with svgalib driver? Hi, I noticed that the SDL (1.2.9) svgalib driver only makes use of linear addressable (framebuffer) video modes. On older systems (like one of mine), linear addressable modes are often not available. Especially for cards with VESA VBE < 2.0 the svgalib vesa driver is unusable, since VESA only supports framebuffering for VBE 2.0 and later. The changes necessary to add support for software surfaces seem to be relatively small. I only had to hack src/video/svga/SDL_svgavideo.c (see attached patch). The code worked fine for me, but it is no more than a proof of concept and should be reviewed (probably has a memory leak when switching modes). It also uses the vgagl library (included in the svgalib package) and needs to be linked against it. -Alex diff -r 0ca607a5d173 -r 780fd5b61df1 configure.in --- a/configure.in Sun Mar 19 12:04:40 2006 +0000 +++ b/configure.in Sun Mar 19 12:05:16 2006 +0000 @@ -1064,7 +1064,7 @@ { AC_ARG_ENABLE(video-svga, AC_HELP_STRING([--enable-video-svga], [use SVGAlib video driver [default=no]]), - , enable_video_svga=no) + , enable_video_svga=yes) if test x$enable_video = xyes -a x$enable_video_svga = xyes; then AC_MSG_CHECKING(for SVGAlib (1.4.0+) support) video_svga=no @@ -1072,6 +1072,7 @@ #include #include #include + #include ],[ if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) { exit(0); @@ -1083,7 +1084,7 @@ if test x$video_svga = xyes; then AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB) SOURCES="$SOURCES $srcdir/src/video/svga/*.c" - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvga" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvga -lvgagl" have_video=yes fi fi