]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Tweak the key handling, may need more invasive changes.
authorwarp <warp@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Oct 2003 05:45:42 +0000 (05:45 +0000)
committerwarp <warp@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Oct 2003 05:45:42 +0000 (05:45 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3579 d7cf8633-e32d-0410-b094-e92efae38249

vid_glx.c

index 4a5e04171031b3050e17fd7b5910578b2a1d664c..8b9c02812b2955210126ce32ef55192b255e7516 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -112,9 +112,10 @@ static int XLateKey(XKeyEvent *ev)
 {
        int key = 0;
        char buf[64];
-       KeySym keysym;
+       KeySym keysym, shifted;
 
-       XLookupString(ev, buf, sizeof buf, &keysym, 0);
+       keysym = XLookupKeysym (ev, 0);
+       XLookupString(ev, buf, sizeof buf, &shifted, 0);
 
        switch(keysym)
        {
@@ -226,7 +227,7 @@ static int XLateKey(XKeyEvent *ev)
 #endif
 
                default:
-                       key = *(unsigned char*)buf;
+                       key = buf[0];
                        if (key >= 'A' && key <= 'Z')
                                key = key - 'A' + 'a';
                        break;