Ričardas Barkauskas : dinput: Fix counting non mapped axis as pov.

Alexandre Julliard julliard at winehq.org
Wed Oct 21 13:13:59 CDT 2009


Module: wine
Branch: master
Commit: 258fd75b39fcbe8ea1782cbbbe3bed37a2c643b5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=258fd75b39fcbe8ea1782cbbbe3bed37a2c643b5

Author: Ričardas Barkauskas <miegalius at gmail.com>
Date:   Wed Oct 21 00:12:00 2009 +0300

dinput: Fix counting non mapped axis as pov.

---

 dlls/dinput/joystick.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 489342e..84e45c9 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -549,7 +549,9 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
             {
                 This->axis_map[i] = default_axis_map[i];
                 tokens = default_axis_map[i];
-                if (tokens >= 0 && tokens < 8)
+                if (tokens < 0)
+                    continue;
+                if (tokens < 8)
                     axis++;
                 else if (tokens < 15)
                 {




More information about the wine-cvs mailing list