summaryrefslogtreecommitdiff
path: root/src/unix/sdl_glimp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unix/sdl_glimp.c')
-rw-r--r--src/unix/sdl_glimp.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/unix/sdl_glimp.c b/src/unix/sdl_glimp.c
index e0ab58ce..a42fbe8e 100644
--- a/src/unix/sdl_glimp.c
+++ b/src/unix/sdl_glimp.c
@@ -253,27 +253,20 @@ static const char *XLateKey(SDL_keysym *keysym, int *key)
default: break;
}
- if (*key == K_BACKSPACE)
- buf[0] = 8;
- else
+ if( keysym->unicode <= 127 ) // maps to ASCII?
{
- if (keysym->unicode <= 255 && keysym->unicode >= 20) // maps to ASCII?
- {
- char ch = (char) keysym->unicode;
- if (ch == '~')
- *key = '~'; // console HACK
-
- // The X11 driver converts to lowercase, but apparently we shouldn't.
- // There's possibly somewhere else where they covert back. Passing
- // uppercase to the engine works fine and fixes all-lower input.
- // (https://bugzilla.icculus.org/show_bug.cgi?id=2364) --ryan.
- //else if (ch >= 'A' && ch <= 'Z')
- // ch = ch - 'A' + 'a';
-
- buf[0] = ch;
- }
- else if(keysym->unicode == 8) // ctrl-h
- buf[0] = 8;
+ char ch = (char) keysym->unicode;
+ if (ch == '~')
+ *key = '~'; // console HACK
+
+ // The X11 driver converts to lowercase, but apparently we shouldn't.
+ // There's possibly somewhere else where they covert back. Passing
+ // uppercase to the engine works fine and fixes all-lower input.
+ // (https://bugzilla.icculus.org/show_bug.cgi?id=2364) --ryan.
+ //else if (ch >= 'A' && ch <= 'Z')
+ // ch = ch - 'A' + 'a';
+
+ buf[0] = ch;
}
return buf;
@@ -1290,7 +1283,11 @@ void IN_Init(void) {
in_joystickDebug = Cvar_Get ("in_debugjoystick", "0", CVAR_TEMP);
joy_threshold = Cvar_Get ("joy_threshold", "0.15", CVAR_ARCHIVE); // FIXME: in_joythreshold
+#ifdef MACOS_X
+ Cvar_Set( "cl_platformSensitivity", "1.0" );
+#else
Cvar_Set( "cl_platformSensitivity", "2.0" );
+#endif
if (in_mouse->value)
mouse_avail = qtrue;