Sync with latest changes in sdl-devel port:
- add svgalib support (tested with C&T65554); - make it USE_LIBTOOL; - remove spaces between `@' and `$' in targets; - decrease amount of tabs used to make variables indentation from 2 to 1.
This commit is contained in:
parent
21c41b7609
commit
ade661fb42
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=32152
@ -5,35 +5,43 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= sdl
|
||||
PORTVERSION= 1.0.8
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.libsdl.org/release/ \
|
||||
http://www.devolution.com/~slouken/SDL/release/
|
||||
DISTNAME= SDL-${PORTVERSION}
|
||||
PORTNAME= sdl
|
||||
PORTVERSION= 1.0.8
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.libsdl.org/release/ \
|
||||
http://www.devolution.com/~slouken/SDL/release/
|
||||
DISTNAME= SDL-${PORTVERSION}
|
||||
|
||||
MAINTAINER= sobomax@FreeBSD.org
|
||||
MAINTAINER= sobomax@FreeBSD.org
|
||||
|
||||
LIB_DEPENDS= esd.2:${PORTSDIR}/audio/esound
|
||||
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
|
||||
LIB_DEPENDS= esd.2:${PORTSDIR}/audio/esound \
|
||||
vga.1:${PORTSDIR}/graphics/svgalib
|
||||
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
|
||||
|
||||
USE_GMAKE= yes
|
||||
USE_XLIB= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ENV= NASM="${LOCALBASE}/bin/nasm" \
|
||||
LOCALBASE="${LOCALBASE}"
|
||||
CFLAGS+= -D_THREAD_SAFE
|
||||
USE_GMAKE= yes
|
||||
USE_XLIB= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
USE_LIBTOOL= yes
|
||||
|
||||
CONFIGURE_ENV= NASM="${LOCALBASE}/bin/nasm" \
|
||||
LOCALBASE="${LOCALBASE}"
|
||||
CONFIGURE_ARGS= --enable-video-svga
|
||||
|
||||
CFLAGS+= -D_THREAD_SAFE
|
||||
|
||||
post-configure:
|
||||
@${PERL} -pi -e 's|^deplibs_check_method=.*|deplibs_check_method=pass_all|' \
|
||||
${WRKSRC}/libtool
|
||||
|
||||
post-install:
|
||||
@ ${MKDIR} ${PREFIX}/share/examples/SDL
|
||||
@ ${INSTALL_DATA} ${WRKSRC}/test/* ${PREFIX}/share/examples/SDL
|
||||
@${MKDIR} ${PREFIX}/share/examples/SDL
|
||||
@${INSTALL_DATA} ${WRKSRC}/test/* ${PREFIX}/share/examples/SDL
|
||||
.if !defined(NOPORTDOCS)
|
||||
@ ${MKDIR} ${PREFIX}/share/doc/SDL
|
||||
@${MKDIR} ${PREFIX}/share/doc/SDL
|
||||
.for file in BUGS COPYING CREDITS README WhatsNew docs.html
|
||||
@ ${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/SDL
|
||||
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/SDL
|
||||
.endfor
|
||||
@ cd ${WRKSRC}/docs; tar cf - `${ECHO} [^M]*` | \
|
||||
@cd ${WRKSRC}/docs; tar cf - `${ECHO} [^M]*` | \
|
||||
(cd ${PREFIX}/share/doc/SDL; ${TAR} --unlink -xf - )
|
||||
.endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- configure.orig Sat Mar 4 04:58:00 2000
|
||||
+++ configure Mon Mar 6 13:40:33 2000
|
||||
+++ configure Thu Aug 31 18:43:39 2000
|
||||
@@ -604,9 +604,9 @@
|
||||
|
||||
# libtool versioning
|
||||
@ -12,7 +12,25 @@
|
||||
|
||||
|
||||
|
||||
@@ -4324,7 +4324,7 @@
|
||||
@@ -2142,7 +2142,7 @@
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $target \
|
||||
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $target \
|
||||
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
@@ -4279,8 +4279,6 @@
|
||||
#include <vga.h>
|
||||
#include <vgamouse.h>
|
||||
#include <vgakeyboard.h>
|
||||
- #include <linux/kd.h>
|
||||
- #include <linux/keyboard.h>
|
||||
|
||||
int main() {
|
||||
|
||||
@@ -4324,7 +4322,7 @@
|
||||
ac_save_libs="$LIBS"
|
||||
case "$target" in
|
||||
*-*-freebsd*)
|
||||
@ -21,7 +39,7 @@
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
pthread_lib="-lc_r"
|
||||
@@ -4364,7 +4364,7 @@
|
||||
@@ -4364,7 +4362,7 @@
|
||||
echo "$ac_t""$use_pthreads" 1>&6
|
||||
if test x$use_pthreads = xyes; then
|
||||
CFLAGS="$CFLAGS -D_REENTRANT -DSDL_USE_PTHREADS"
|
||||
@ -30,11 +48,14 @@
|
||||
SDL_LIBS="$SDL_LIBS $pthread_lib"
|
||||
fi
|
||||
fi
|
||||
@@ -4953,6 +4953,7 @@
|
||||
@@ -4953,8 +4951,10 @@
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
ARCH=freebsd
|
||||
+ CheckNASM
|
||||
CheckESD
|
||||
CheckX11
|
||||
+ CheckSVGA
|
||||
CheckPTHREAD
|
||||
# Set up files for the main() stub
|
||||
|
||||
|
123
devel/sdl/files/patch-an
Normal file
123
devel/sdl/files/patch-an
Normal file
@ -0,0 +1,123 @@
|
||||
--- 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 @@
|
||||
#include "SDL_svgaevents_c.h"
|
||||
|
||||
/* The translation tables from a console scancode to a SDL keysym */
|
||||
-#define NUM_VGAKEYMAPS (1<<KG_CAPSSHIFT)
|
||||
-static Uint16 vga_keymap[NUM_VGAKEYMAPS][NR_KEYS];
|
||||
static SDLKey keymap[128];
|
||||
static SDL_keysym *TranslateKey(int scancode, SDL_keysym *keysym);
|
||||
|
||||
@@ -54,70 +52,6 @@
|
||||
*/
|
||||
void SVGA_initkeymaps(int fd)
|
||||
{
|
||||
- struct kbentry entry;
|
||||
- int map, i;
|
||||
-
|
||||
- /* Load all the keysym mappings */
|
||||
- for ( map=0; map<NUM_VGAKEYMAPS; ++map ) {
|
||||
- memset(vga_keymap[map], 0, NR_KEYS*sizeof(Uint16));
|
||||
- for ( i=0; i<NR_KEYS; ++i ) {
|
||||
- entry.kb_table = map;
|
||||
- entry.kb_index = i;
|
||||
- if ( ioctl(fd, KDGKBENT, &entry) == 0 ) {
|
||||
- /* The "Enter" key is a special case */
|
||||
- if ( entry.kb_value == K_ENTER ) {
|
||||
- entry.kb_value = K(KT_ASCII,13);
|
||||
- }
|
||||
- /* Handle numpad specially as well */
|
||||
- if ( KTYP(entry.kb_value) == KT_PAD ) {
|
||||
- switch ( entry.kb_value ) {
|
||||
- case K_P0:
|
||||
- case K_P1:
|
||||
- case K_P2:
|
||||
- case K_P3:
|
||||
- case K_P4:
|
||||
- case K_P5:
|
||||
- case K_P6:
|
||||
- case K_P7:
|
||||
- case K_P8:
|
||||
- case K_P9:
|
||||
- vga_keymap[map][i]=entry.kb_value;
|
||||
- vga_keymap[map][i]+= '0';
|
||||
- break;
|
||||
- case K_PPLUS:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'+');
|
||||
- break;
|
||||
- case K_PMINUS:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'-');
|
||||
- break;
|
||||
- case K_PSTAR:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'*');
|
||||
- break;
|
||||
- case K_PSLASH:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'/');
|
||||
- break;
|
||||
- case K_PENTER:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'\r');
|
||||
- break;
|
||||
- case K_PCOMMA:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,',');
|
||||
- break;
|
||||
- case K_PDOT:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'.');
|
||||
- break;
|
||||
- default:
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- /* Do the normal key translation */
|
||||
- if ( (KTYP(entry.kb_value) == KT_LATIN) ||
|
||||
- (KTYP(entry.kb_value) == KT_ASCII) ||
|
||||
- (KTYP(entry.kb_value) == KT_LETTER) ) {
|
||||
- vga_keymap[map][i] = entry.kb_value;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
int posted = 0;
|
||||
@@ -312,38 +246,10 @@
|
||||
keysym->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 ) {
|
||||
- map |= (1<<KG_SHIFT);
|
||||
- }
|
||||
- if ( modstate & KMOD_CTRL ) {
|
||||
- map |= (1<<KG_CTRL);
|
||||
- }
|
||||
- if ( modstate & KMOD_ALT ) {
|
||||
- map |= (1<<KG_ALT);
|
||||
- }
|
||||
- if ( modstate & KMOD_MODE ) {
|
||||
- map |= (1<<KG_ALTGR);
|
||||
- }
|
||||
- if ( KTYP(vga_keymap[map][scancode]) == KT_LETTER ) {
|
||||
- if ( modstate & KMOD_CAPS ) {
|
||||
- map ^= (1<<KG_SHIFT);
|
||||
- }
|
||||
- }
|
||||
- if ( KTYP(vga_keymap[map][scancode]) == KT_PAD ) {
|
||||
- if ( modstate & KMOD_NUM ) {
|
||||
- keysym->unicode=KVAL(vga_keymap[map][scancode]);
|
||||
- }
|
||||
- } else {
|
||||
- keysym->unicode = KVAL(vga_keymap[map][scancode]);
|
||||
- }
|
||||
+ /* Populate the unicode field with the ASCII value */
|
||||
+ keysym->unicode = scancode;
|
||||
}
|
||||
return(keysym);
|
||||
}
|
11
devel/sdl/files/patch-ao
Normal file
11
devel/sdl/files/patch-ao
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/video/svga/SDL_svgavideo.c 2000/08/29 19:51:53 1.1
|
||||
+++ src/video/svga/SDL_svgavideo.c 2000/08/29 19:53:18
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
-#include <linux/vt.h>
|
||||
+#include <sys/consio.h>
|
||||
#include <vga.h>
|
||||
#include <vgamouse.h>
|
||||
#include <vgakeyboard.h>
|
@ -23,10 +23,8 @@ include/SDL/SDL_version.h
|
||||
include/SDL/SDL_video.h
|
||||
include/SDL/begin_code.h
|
||||
include/SDL/close_code.h
|
||||
lib/libSDL-1.0.so
|
||||
lib/libSDL-1.0.so.2
|
||||
lib/libSDL.a
|
||||
lib/libSDL.la
|
||||
lib/libSDL.so
|
||||
lib/libSDLmain.a
|
||||
share/aclocal/sdl.m4
|
||||
|
@ -5,35 +5,43 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= sdl
|
||||
PORTVERSION= 1.0.8
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.libsdl.org/release/ \
|
||||
http://www.devolution.com/~slouken/SDL/release/
|
||||
DISTNAME= SDL-${PORTVERSION}
|
||||
PORTNAME= sdl
|
||||
PORTVERSION= 1.0.8
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.libsdl.org/release/ \
|
||||
http://www.devolution.com/~slouken/SDL/release/
|
||||
DISTNAME= SDL-${PORTVERSION}
|
||||
|
||||
MAINTAINER= sobomax@FreeBSD.org
|
||||
MAINTAINER= sobomax@FreeBSD.org
|
||||
|
||||
LIB_DEPENDS= esd.2:${PORTSDIR}/audio/esound
|
||||
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
|
||||
LIB_DEPENDS= esd.2:${PORTSDIR}/audio/esound \
|
||||
vga.1:${PORTSDIR}/graphics/svgalib
|
||||
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
|
||||
|
||||
USE_GMAKE= yes
|
||||
USE_XLIB= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ENV= NASM="${LOCALBASE}/bin/nasm" \
|
||||
LOCALBASE="${LOCALBASE}"
|
||||
CFLAGS+= -D_THREAD_SAFE
|
||||
USE_GMAKE= yes
|
||||
USE_XLIB= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
USE_LIBTOOL= yes
|
||||
|
||||
CONFIGURE_ENV= NASM="${LOCALBASE}/bin/nasm" \
|
||||
LOCALBASE="${LOCALBASE}"
|
||||
CONFIGURE_ARGS= --enable-video-svga
|
||||
|
||||
CFLAGS+= -D_THREAD_SAFE
|
||||
|
||||
post-configure:
|
||||
@${PERL} -pi -e 's|^deplibs_check_method=.*|deplibs_check_method=pass_all|' \
|
||||
${WRKSRC}/libtool
|
||||
|
||||
post-install:
|
||||
@ ${MKDIR} ${PREFIX}/share/examples/SDL
|
||||
@ ${INSTALL_DATA} ${WRKSRC}/test/* ${PREFIX}/share/examples/SDL
|
||||
@${MKDIR} ${PREFIX}/share/examples/SDL
|
||||
@${INSTALL_DATA} ${WRKSRC}/test/* ${PREFIX}/share/examples/SDL
|
||||
.if !defined(NOPORTDOCS)
|
||||
@ ${MKDIR} ${PREFIX}/share/doc/SDL
|
||||
@${MKDIR} ${PREFIX}/share/doc/SDL
|
||||
.for file in BUGS COPYING CREDITS README WhatsNew docs.html
|
||||
@ ${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/SDL
|
||||
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/SDL
|
||||
.endfor
|
||||
@ cd ${WRKSRC}/docs; tar cf - `${ECHO} [^M]*` | \
|
||||
@cd ${WRKSRC}/docs; tar cf - `${ECHO} [^M]*` | \
|
||||
(cd ${PREFIX}/share/doc/SDL; ${TAR} --unlink -xf - )
|
||||
.endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- configure.orig Sat Mar 4 04:58:00 2000
|
||||
+++ configure Mon Mar 6 13:40:33 2000
|
||||
+++ configure Thu Aug 31 18:43:39 2000
|
||||
@@ -604,9 +604,9 @@
|
||||
|
||||
# libtool versioning
|
||||
@ -12,7 +12,25 @@
|
||||
|
||||
|
||||
|
||||
@@ -4324,7 +4324,7 @@
|
||||
@@ -2142,7 +2142,7 @@
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $target \
|
||||
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $target \
|
||||
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
@@ -4279,8 +4279,6 @@
|
||||
#include <vga.h>
|
||||
#include <vgamouse.h>
|
||||
#include <vgakeyboard.h>
|
||||
- #include <linux/kd.h>
|
||||
- #include <linux/keyboard.h>
|
||||
|
||||
int main() {
|
||||
|
||||
@@ -4324,7 +4322,7 @@
|
||||
ac_save_libs="$LIBS"
|
||||
case "$target" in
|
||||
*-*-freebsd*)
|
||||
@ -21,7 +39,7 @@
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
pthread_lib="-lc_r"
|
||||
@@ -4364,7 +4364,7 @@
|
||||
@@ -4364,7 +4362,7 @@
|
||||
echo "$ac_t""$use_pthreads" 1>&6
|
||||
if test x$use_pthreads = xyes; then
|
||||
CFLAGS="$CFLAGS -D_REENTRANT -DSDL_USE_PTHREADS"
|
||||
@ -30,11 +48,14 @@
|
||||
SDL_LIBS="$SDL_LIBS $pthread_lib"
|
||||
fi
|
||||
fi
|
||||
@@ -4953,6 +4953,7 @@
|
||||
@@ -4953,8 +4951,10 @@
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
ARCH=freebsd
|
||||
+ CheckNASM
|
||||
CheckESD
|
||||
CheckX11
|
||||
+ CheckSVGA
|
||||
CheckPTHREAD
|
||||
# Set up files for the main() stub
|
||||
|
||||
|
123
devel/sdl10/files/patch-an
Normal file
123
devel/sdl10/files/patch-an
Normal file
@ -0,0 +1,123 @@
|
||||
--- 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 @@
|
||||
#include "SDL_svgaevents_c.h"
|
||||
|
||||
/* The translation tables from a console scancode to a SDL keysym */
|
||||
-#define NUM_VGAKEYMAPS (1<<KG_CAPSSHIFT)
|
||||
-static Uint16 vga_keymap[NUM_VGAKEYMAPS][NR_KEYS];
|
||||
static SDLKey keymap[128];
|
||||
static SDL_keysym *TranslateKey(int scancode, SDL_keysym *keysym);
|
||||
|
||||
@@ -54,70 +52,6 @@
|
||||
*/
|
||||
void SVGA_initkeymaps(int fd)
|
||||
{
|
||||
- struct kbentry entry;
|
||||
- int map, i;
|
||||
-
|
||||
- /* Load all the keysym mappings */
|
||||
- for ( map=0; map<NUM_VGAKEYMAPS; ++map ) {
|
||||
- memset(vga_keymap[map], 0, NR_KEYS*sizeof(Uint16));
|
||||
- for ( i=0; i<NR_KEYS; ++i ) {
|
||||
- entry.kb_table = map;
|
||||
- entry.kb_index = i;
|
||||
- if ( ioctl(fd, KDGKBENT, &entry) == 0 ) {
|
||||
- /* The "Enter" key is a special case */
|
||||
- if ( entry.kb_value == K_ENTER ) {
|
||||
- entry.kb_value = K(KT_ASCII,13);
|
||||
- }
|
||||
- /* Handle numpad specially as well */
|
||||
- if ( KTYP(entry.kb_value) == KT_PAD ) {
|
||||
- switch ( entry.kb_value ) {
|
||||
- case K_P0:
|
||||
- case K_P1:
|
||||
- case K_P2:
|
||||
- case K_P3:
|
||||
- case K_P4:
|
||||
- case K_P5:
|
||||
- case K_P6:
|
||||
- case K_P7:
|
||||
- case K_P8:
|
||||
- case K_P9:
|
||||
- vga_keymap[map][i]=entry.kb_value;
|
||||
- vga_keymap[map][i]+= '0';
|
||||
- break;
|
||||
- case K_PPLUS:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'+');
|
||||
- break;
|
||||
- case K_PMINUS:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'-');
|
||||
- break;
|
||||
- case K_PSTAR:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'*');
|
||||
- break;
|
||||
- case K_PSLASH:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'/');
|
||||
- break;
|
||||
- case K_PENTER:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'\r');
|
||||
- break;
|
||||
- case K_PCOMMA:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,',');
|
||||
- break;
|
||||
- case K_PDOT:
|
||||
- vga_keymap[map][i]=K(KT_ASCII,'.');
|
||||
- break;
|
||||
- default:
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- /* Do the normal key translation */
|
||||
- if ( (KTYP(entry.kb_value) == KT_LATIN) ||
|
||||
- (KTYP(entry.kb_value) == KT_ASCII) ||
|
||||
- (KTYP(entry.kb_value) == KT_LETTER) ) {
|
||||
- vga_keymap[map][i] = entry.kb_value;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
int posted = 0;
|
||||
@@ -312,38 +246,10 @@
|
||||
keysym->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 ) {
|
||||
- map |= (1<<KG_SHIFT);
|
||||
- }
|
||||
- if ( modstate & KMOD_CTRL ) {
|
||||
- map |= (1<<KG_CTRL);
|
||||
- }
|
||||
- if ( modstate & KMOD_ALT ) {
|
||||
- map |= (1<<KG_ALT);
|
||||
- }
|
||||
- if ( modstate & KMOD_MODE ) {
|
||||
- map |= (1<<KG_ALTGR);
|
||||
- }
|
||||
- if ( KTYP(vga_keymap[map][scancode]) == KT_LETTER ) {
|
||||
- if ( modstate & KMOD_CAPS ) {
|
||||
- map ^= (1<<KG_SHIFT);
|
||||
- }
|
||||
- }
|
||||
- if ( KTYP(vga_keymap[map][scancode]) == KT_PAD ) {
|
||||
- if ( modstate & KMOD_NUM ) {
|
||||
- keysym->unicode=KVAL(vga_keymap[map][scancode]);
|
||||
- }
|
||||
- } else {
|
||||
- keysym->unicode = KVAL(vga_keymap[map][scancode]);
|
||||
- }
|
||||
+ /* Populate the unicode field with the ASCII value */
|
||||
+ keysym->unicode = scancode;
|
||||
}
|
||||
return(keysym);
|
||||
}
|
11
devel/sdl10/files/patch-ao
Normal file
11
devel/sdl10/files/patch-ao
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/video/svga/SDL_svgavideo.c 2000/08/29 19:51:53 1.1
|
||||
+++ src/video/svga/SDL_svgavideo.c 2000/08/29 19:53:18
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
-#include <linux/vt.h>
|
||||
+#include <sys/consio.h>
|
||||
#include <vga.h>
|
||||
#include <vgamouse.h>
|
||||
#include <vgakeyboard.h>
|
@ -23,10 +23,8 @@ include/SDL/SDL_version.h
|
||||
include/SDL/SDL_video.h
|
||||
include/SDL/begin_code.h
|
||||
include/SDL/close_code.h
|
||||
lib/libSDL-1.0.so
|
||||
lib/libSDL-1.0.so.2
|
||||
lib/libSDL.a
|
||||
lib/libSDL.la
|
||||
lib/libSDL.so
|
||||
lib/libSDLmain.a
|
||||
share/aclocal/sdl.m4
|
||||
|
Loading…
Reference in New Issue
Block a user