From 70e4ffd5771a1b3744d5d60f69cd64152d43a7ab Mon Sep 17 00:00:00 2001 From: sobomax Date: Mon, 25 Sep 2000 07:23:57 +0000 Subject: Properly convert scancode into acsii representation in svga driver. --- devel/sdl-devel/Makefile | 1 + devel/sdl/Makefile | 1 + devel/sdl/files/patch-an | 66 +++++++++++++++++++++++++++++++--------------- devel/sdl10/Makefile | 1 + devel/sdl10/files/patch-an | 66 +++++++++++++++++++++++++++++++--------------- devel/sdl12/Makefile | 1 + 6 files changed, 94 insertions(+), 42 deletions(-) (limited to 'devel') diff --git a/devel/sdl-devel/Makefile b/devel/sdl-devel/Makefile index 85076583255f..359d6df3b4b7 100644 --- a/devel/sdl-devel/Makefile +++ b/devel/sdl-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= sdl-devel PORTVERSION= 1.1.4 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://www.libsdl.org/release/ \ http://www.devolution.com/~slouken/SDL/release/ diff --git a/devel/sdl/Makefile b/devel/sdl/Makefile index 8b4f967c323d..3032cc2c5cb9 100644 --- a/devel/sdl/Makefile +++ b/devel/sdl/Makefile @@ -7,6 +7,7 @@ PORTNAME= sdl PORTVERSION= 1.0.8 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://www.libsdl.org/release/ \ http://www.devolution.com/~slouken/SDL/release/ diff --git a/devel/sdl/files/patch-an b/devel/sdl/files/patch-an index 6cb0a945aaeb..25d170673525 100644 --- a/devel/sdl/files/patch-an +++ b/devel/sdl/files/patch-an @@ -1,15 +1,32 @@ ---- src/video/svga/SDL_svgaevents.c 2000/08/25 03:55:01 1.1 -+++ src/video/svga/SDL_svgaevents.c 2000/08/29 19:58:36 -@@ -42,8 +42,6 @@ +--- src/video/svga/SDL_svgaevents.c.orig Wed Nov 24 01:46:25 1999 ++++ src/video/svga/SDL_svgaevents.c Sun Sep 24 00:28:45 2000 +@@ -28,12 +28,14 @@ + /* Handle the event stream, converting X11 events into SDL events */ + + #include ++#include + + #include + #include + #include + #include + #include ++#include + + #include "SDL.h" + #include "SDL_sysevents.h" +@@ -42,9 +44,8 @@ #include "SDL_svgaevents_c.h" /* The translation tables from a console scancode to a SDL keysym */ -#define NUM_VGAKEYMAPS (1<sym = keymap[scancode]; keysym->mod = KMOD_NONE; - /* If UNICODE is on, get the UNICODE value for the key */ keysym->unicode = 0; - if ( SDL_TranslateUNICODE ) { -- int map; -- SDLMod modstate; -- -- modstate = SDL_GetModState(); -- map = 0; -- if ( modstate & KMOD_SHIFT ) { +- if ( SDL_TranslateUNICODE ) { ++ if ( (SDL_TranslateUNICODE) && (vga_keymap != NULL) ) { + int map; + SDLMod modstate; + + modstate = SDL_GetModState(); + map = 0; + if ( modstate & KMOD_SHIFT ) { - map |= (1<unicode = KVAL(vga_keymap[map][scancode]); -- } -+ /* Populate the unicode field with the ASCII value */ -+ keysym->unicode = scancode; ++ map += 4; + } ++ if ( !(vga_keymap->key[scancode].spcl & (0x80 >> map)) ) ++ keysym->unicode = vga_keymap->key[scancode].map[map]; } return(keysym); } diff --git a/devel/sdl10/Makefile b/devel/sdl10/Makefile index 8b4f967c323d..3032cc2c5cb9 100644 --- a/devel/sdl10/Makefile +++ b/devel/sdl10/Makefile @@ -7,6 +7,7 @@ PORTNAME= sdl PORTVERSION= 1.0.8 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://www.libsdl.org/release/ \ http://www.devolution.com/~slouken/SDL/release/ diff --git a/devel/sdl10/files/patch-an b/devel/sdl10/files/patch-an index 6cb0a945aaeb..25d170673525 100644 --- a/devel/sdl10/files/patch-an +++ b/devel/sdl10/files/patch-an @@ -1,15 +1,32 @@ ---- src/video/svga/SDL_svgaevents.c 2000/08/25 03:55:01 1.1 -+++ src/video/svga/SDL_svgaevents.c 2000/08/29 19:58:36 -@@ -42,8 +42,6 @@ +--- src/video/svga/SDL_svgaevents.c.orig Wed Nov 24 01:46:25 1999 ++++ src/video/svga/SDL_svgaevents.c Sun Sep 24 00:28:45 2000 +@@ -28,12 +28,14 @@ + /* Handle the event stream, converting X11 events into SDL events */ + + #include ++#include + + #include + #include + #include + #include + #include ++#include + + #include "SDL.h" + #include "SDL_sysevents.h" +@@ -42,9 +44,8 @@ #include "SDL_svgaevents_c.h" /* The translation tables from a console scancode to a SDL keysym */ -#define NUM_VGAKEYMAPS (1<sym = keymap[scancode]; keysym->mod = KMOD_NONE; - /* If UNICODE is on, get the UNICODE value for the key */ keysym->unicode = 0; - if ( SDL_TranslateUNICODE ) { -- int map; -- SDLMod modstate; -- -- modstate = SDL_GetModState(); -- map = 0; -- if ( modstate & KMOD_SHIFT ) { +- if ( SDL_TranslateUNICODE ) { ++ if ( (SDL_TranslateUNICODE) && (vga_keymap != NULL) ) { + int map; + SDLMod modstate; + + modstate = SDL_GetModState(); + map = 0; + if ( modstate & KMOD_SHIFT ) { - map |= (1<unicode = KVAL(vga_keymap[map][scancode]); -- } -+ /* Populate the unicode field with the ASCII value */ -+ keysym->unicode = scancode; ++ map += 4; + } ++ if ( !(vga_keymap->key[scancode].spcl & (0x80 >> map)) ) ++ keysym->unicode = vga_keymap->key[scancode].map[map]; } return(keysym); } diff --git a/devel/sdl12/Makefile b/devel/sdl12/Makefile index 85076583255f..359d6df3b4b7 100644 --- a/devel/sdl12/Makefile +++ b/devel/sdl12/Makefile @@ -7,6 +7,7 @@ PORTNAME= sdl-devel PORTVERSION= 1.1.4 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://www.libsdl.org/release/ \ http://www.devolution.com/~slouken/SDL/release/ -- cgit