Skip to content
Permalink
Browse files

Fixed bug #89

Date: Sun, 23 Oct 2005 16:39:03 +0200
From: "A. Schmid" <sahib@phreaker.net>
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
  • Loading branch information
slouken committed Mar 19, 2006
1 parent 79d1f3e commit aed8754261b6b11caeec1fff612746edbf73200b
Showing with 3 additions and 2 deletions.
  1. +3 −2 configure.in
@@ -1064,14 +1064,15 @@ CheckSVGA()
{
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
AC_TRY_COMPILE([
#include <vga.h>
#include <vgamouse.h>
#include <vgakeyboard.h>
#include <vgagl.h>
],[
if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
exit(0);
@@ -1083,7 +1084,7 @@ AC_HELP_STRING([--enable-video-svga], [use SVGAlib video driver [default=no]]),
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

0 comments on commit aed8754

Please sign in to comment.