summaryrefslogtreecommitdiffstats
path: root/devel/sdl12
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-01-27 21:22:21 +0000
committersobomax <sobomax@FreeBSD.org>2001-01-27 21:22:21 +0000
commitcf86ed821a21b818d2ab70cd871fc0224e4414d4 (patch)
treec830a013cf941bbb8018afcba5e34a64bf529fa8 /devel/sdl12
parent5d628409ac0ce364be9347b18dce8cbc828fdfa0 (diff)
downloadFreeBSD-ports-cf86ed821a21b818d2ab70cd871fc0224e4414d4.zip
FreeBSD-ports-cf86ed821a21b818d2ab70cd871fc0224e4414d4.tar.gz
Fix a rather nasty last-minute bug, which prevented SDL from using vesa modes
with bpp > 8.
Diffstat (limited to 'devel/sdl12')
-rw-r--r--devel/sdl12/files/patch-src_video_vgl_SDL__vglvideo.c20
1 files changed, 13 insertions, 7 deletions
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 7a8f38c..e98aed5 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 17:45:48 2001
-+++ src/video/vgl/SDL_vglvideo.c Sat Jan 27 18:13:31 2001
-@@ -0,0 +1,616 @@
+--- 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 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997, 1998, 1999, 2000 Sam Lantinga
@@ -34,6 +34,8 @@ $FreeBSD$
+/* libvga based SDL video driver implementation.
+*/
+
++#include <err.h>
++#include <osreldate.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
@@ -232,9 +234,13 @@ $FreeBSD$
+ }
+
+ /* Enable mouse and keyboard support */
-+ if (VGLKeyboardInit(VGL_CODEKEYS) != 0) {
-+ SDL_SetError("Unable to initialize keyboard");
-+ return -1;
++ if (getenv("SDL_NO_RAWKBD") == NULL) {
++ if (VGLKeyboardInit(VGL_CODEKEYS) != 0) {
++ SDL_SetError("Unable to initialize keyboard");
++ return -1;
++ }
++ } else {
++ warnx("Requiest to put keyboard into a raw mode ignored");
+ }
+ if (VGL_initkeymaps(STDIN_FILENO) != 0) {
+ SDL_SetError("Unable to initialize keymap");
@@ -537,7 +543,7 @@ $FreeBSD$
+ case V_INFO_MM_VGAX:
+ vminfop->Type = VIDBUF8X;
+ break;
-+#if __FreeBSD_version >= 500000
++#if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
+ case V_INFO_MM_DIRECT:
+ vminfop->PixelBytes = minfo.vi_pixel_size;
+ switch (vminfop->PixelBytes) {
OpenPOWER on IntegriCloud