~ubuntu-branches/ubuntu/jaunty/xserver-xorg-input-evdev/jaunty

« back to all changes in this revision

Viewing changes to patches/evdev-with-high-keys.diff

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2008-10-21 18:23:09 UTC
  • Revision ID: james.westby@ubuntu.com-20081021182309-7585r92l688krdm1
Tags: 1:2.0.99+git20080912-0ubuntu6
101_64bit_safe_testbit.patch: On amd64 evdev would be used for joysticks
because TestBit would return a wrong value. (LP: #284951)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: xserver-xorg-input-evdev/src/evdev.c
2
 
===================================================================
3
 
--- xserver-xorg-input-evdev.orig/src/evdev.c   2008-10-08 11:56:28.000000000 +0300
4
 
+++ xserver-xorg-input-evdev/src/evdev.c        2008-10-15 15:42:22.000000000 +0300
5
 
@@ -1279,14 +1279,17 @@
6
 
                 num_buttons);
7
 
     }
8
 
 
9
 
-    for (i = 0; i < BTN_MISC; i++)
10
 
+    for (i = 0; i < KEY_MAX; i++) {
11
 
+        /* irritating hole in the key range. */
12
 
+        if (i >= BTN_MISC || i < KEY_OK)
13
 
+            continue;
14
 
         if (TestBit(i, key_bitmask))
15
 
-            break;
16
 
+            has_keys = TRUE;
17
 
+    }
18
 
 
19
 
-    if (i < BTN_MISC) {
20
 
+    if (has_keys) {
21
 
         xf86Msg(X_INFO, "%s: Found keys\n", pInfo->name);
22
 
        pEvdev->flags |= EVDEV_KEYBOARD_EVENTS;
23
 
-       has_keys = TRUE;
24
 
     }
25
 
 
26
 
     if (has_axes && num_buttons) {