From e6720ec3f02e6ae27b443b814675107d4facc856 Mon Sep 17 00:00:00 2001
From: Ingo Ruhnke <grumbel@gmx.de>
Date: Thu, 27 Jan 2011 05:04:02 +0100
Subject: [PATCH] Invert the Y axis values, not just negate them, as negating
 them leads them to leave their min:max range

---
 src/uinput_config.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/uinput_config.cpp b/src/uinput_config.cpp
index 1e6d71c..05cadbd 100644
--- a/src/uinput_config.cpp
+++ b/src/uinput_config.cpp
@@ -115,10 +115,10 @@ UInputConfig::send(Xbox360Msg& msg)
 
   // analog sticks
   send_axis(XBOX_AXIS_X1,  msg.x1);
-  send_axis(XBOX_AXIS_Y1, -msg.y1);
+  send_axis(XBOX_AXIS_Y1, ~msg.y1);
   
   send_axis(XBOX_AXIS_X2,  msg.x2);
-  send_axis(XBOX_AXIS_Y2, -msg.y2);
+  send_axis(XBOX_AXIS_Y2, ~msg.y2);
 
   // dpad
   if      (msg.dpad_up)    send_axis(XBOX_AXIS_DPAD_Y, -1);
@@ -167,10 +167,10 @@ UInputConfig::send(XboxMsg& msg)
 
   // analog sticks
   send_axis(XBOX_AXIS_X1,  msg.x1);
-  send_axis(XBOX_AXIS_Y1, -msg.y1);
+  send_axis(XBOX_AXIS_Y1, ~msg.y1);
 
   send_axis(XBOX_AXIS_X2,  msg.x2);
-  send_axis(XBOX_AXIS_Y2, -msg.y2);
+  send_axis(XBOX_AXIS_Y2, ~msg.y2);
 
   // dpad as axis
   if      (msg.dpad_up)    send_axis(XBOX_AXIS_DPAD_Y, -1);