Re: SDL and svgalib

Search this archive.

From: Bryan Stillwell (bryan@bokeoa.com)
Date: Thu 13 Dec 2001 - 02:36:38 IST


On Wed, Dec 12, 2001 at 05:22:56PM -0600, Daniel Pothier wrote:
>    I have written a small program utilizing SDL and svgalib.
>Everything is working perfectly. I was wondering however if there is
>some way to start it remotely (through SSH). I have successfully run
>some of the svgalib demos remotely, however the program utilizing SDL
>fails. I am wondering if this has something to do with the way SDL
>calls vga_init.

SDL has some checks in the code to make sure that you are the owner of
the current console before it'll start up, so without removing those
checks it won't work.  Check out the SVGA_available function in
SDL's src/video/svga/SDL_svgavideo.c to fix it.

Here's a snippet:

  static int SVGA_Available(void)
  {
      /* Check to see if we are root and stdin is a virtual console */
      int console;
      [...]
      return(((svgalib2 != -1) || (geteuid() == 0)) && (console >= 0));
  }


So if you remove the last part of that return function, it should do
what you want:

      return((svgalib2 != -1) || (geteuid() == 0));


Bryan

-- 
  http://www.bokeoa.com/    | bryan@bokeoa.com
  GPG fingerprint: 33F7 44F2 8612 E02F 8DE8  97FB 621E 8A36 6DC1 32AF

------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST