aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-04-09 20:10:16 +0800
committersobomax <sobomax@FreeBSD.org>2001-04-09 20:10:16 +0800
commitbe572a86ebb3f1a8912cb48c3ef116d867bca206 (patch)
tree33d63539c12db1d6148d287fa08b33a76c8ac1aa /devel
parenta1280cf92f9f9c25024cddf76070177abb175ec0 (diff)
downloadfreebsd-ports-gnome-be572a86ebb3f1a8912cb48c3ef116d867bca206.tar.gz
freebsd-ports-gnome-be572a86ebb3f1a8912cb48c3ef116d867bca206.tar.zst
freebsd-ports-gnome-be572a86ebb3f1a8912cb48c3ef116d867bca206.zip
Move detection of vgl availability before svgalib and improve detection
algorithm.
Diffstat (limited to 'devel')
-rw-r--r--devel/sdl12/files/patch-src_video_SDL__video.c12
-rw-r--r--devel/sdl12/files/patch-src_video_vgl_SDL__vglvideo.c32
2 files changed, 32 insertions, 12 deletions
diff --git a/devel/sdl12/files/patch-src_video_SDL__video.c b/devel/sdl12/files/patch-src_video_SDL__video.c
index 98e603c9d132..aaf9161f71bd 100644
--- a/devel/sdl12/files/patch-src_video_SDL__video.c
+++ b/devel/sdl12/files/patch-src_video_SDL__video.c
@@ -1,15 +1,15 @@
$FreeBSD$
---- src/video/SDL_video.c 2001/01/21 20:11:02 1.1
-+++ src/video/SDL_video.c 2001/01/21 20:11:59
+--- src/video/SDL_video.c.orig Mon Mar 19 19:39:06 2001
++++ src/video/SDL_video.c Sun Apr 8 01:34:24 2001
@@ -60,6 +60,9 @@
- #ifdef ENABLE_SVGALIB
- &SVGALIB_bootstrap,
+ #ifdef ENABLE_GGI
+ &GGI_bootstrap,
#endif
+#ifdef ENABLE_VGL
+ &VGL_bootstrap,
+#endif
- #ifdef ENABLE_AALIB
- &AALIB_bootstrap,
+ #ifdef ENABLE_SVGALIB
+ &SVGALIB_bootstrap,
#endif
diff --git a/devel/sdl12/files/patch-src_video_vgl_SDL__vglvideo.c b/devel/sdl12/files/patch-src_video_vgl_SDL__vglvideo.c
index d08442068f7d..0ad67c2f1f3c 100644
--- a/devel/sdl12/files/patch-src_video_vgl_SDL__vglvideo.c
+++ b/devel/sdl12/files/patch-src_video_vgl_SDL__vglvideo.c
@@ -1,9 +1,9 @@
$FreeBSD$
---- src/video/vgl/SDL_vglvideo.c.orig Sat Jan 27 22:36:17 2001
-+++ src/video/vgl/SDL_vglvideo.c Sat Jan 27 23:14:47 2001
-@@ -0,0 +1,622 @@
+--- src/video/vgl/SDL_vglvideo.c.orig Sun Apr 8 01:11:25 2001
++++ src/video/vgl/SDL_vglvideo.c Sun Apr 8 01:33:02 2001
+@@ -0,0 +1,642 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997, 1998, 1999, 2000 Sam Lantinga
@@ -81,8 +81,13 @@ $FreeBSD$
+
+static int VGL_Available(void)
+{
-+ /* Check to see if we are root and stdin is a virtual console */
-+ int console;
++ /*
++ * Check to see if we are root and stdin is a
++ * virtual console. Also try to ensure that
++ * modes other than 320x200 are available
++ */
++ int console, hires_available, i;
++ VGLMode **modes;
+
+ console = STDIN_FILENO;
+ if ( console >= 0 ) {
@@ -94,7 +99,22 @@ $FreeBSD$
+ console = -1;
+ }
+ }
-+ return((geteuid() == 0) && (console >= 0));
++ if (geteuid() != 0 && console == -1)
++ return 0;
++
++ modes = VGLListModes(8, V_INFO_MM_DIRECT | V_INFO_MM_PACKED);
++ hires_available = 0;
++ for (i = 0; modes[i] != NULL; i++) {
++ if ((modes[i]->ModeInfo.Xsize > 320) &&
++ (modes[i]->ModeInfo.Ysize > 200) &&
++ ((modes[i]->ModeInfo.Type == VIDBUF8) ||
++ (modes[i]->ModeInfo.Type == VIDBUF16) ||
++ (modes[i]->ModeInfo.Type == VIDBUF32))) {
++ hires_available = 1;
++ break;
++ }
++ }
++ return hires_available;
+}
+
+static void VGL_DeleteDevice(SDL_VideoDevice *device)