From 6a9aa77b58f3720701de069f7d29075f418a8a39 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 6 Jan 2003 01:13:37 +0000 Subject: [PATCH] fix ToChar --- stepmania/src/RageInput.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageInput.cpp b/stepmania/src/RageInput.cpp index 148ff93f61..9904cd96e7 100644 --- a/stepmania/src/RageInput.cpp +++ b/stepmania/src/RageInput.cpp @@ -271,6 +271,8 @@ bool DeviceInput::fromString( const CString &s ) return true; } +#if 0 + /* FIXME: The main font doesn't have '`' (0x29), so that's disabled. */ static const char SDLK_charmap[] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ @@ -287,14 +289,18 @@ static const char SDLK_charmap[] = { /* 0xAx */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xBx */ 0, 0, 0,',', 0,'/', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; +#endif char DeviceInput::ToChar() const { switch( device ) { case DEVICE_KEYBOARD: - if( button < sizeof(SDLK_charmap) ) - return SDLK_charmap[button]; + if( button < 128 ) + return (char) button; + /* XXX: SDLK_WORLD_* are for international keyboards; we can handle those, + * now, by mapping it to Unicode. However, I can't find any documentation + * on those keysyms. */ return '\0'; default: return '\0';