]> git.saurik.com Git - veency.git/commitdiff
Correct mistake in the iPad3 coordinate transform.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Jun 2012 22:26:06 +0000 (22:26 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Jun 2012 22:26:06 +0000 (22:26 +0000)
Tweak.mm

index 3b76f06a5331ccee344560ae27479a08216b116c..a99c7e9bf8a288e637057edd3e2ff1532f13b8eb 100644 (file)
--- a/Tweak.mm
+++ b/Tweak.mm
@@ -317,20 +317,20 @@ static void VNCPointer(int buttons, int x, int y, rfbClientPtr client) {
 
     CGPoint location = {x, y};
 
 
     CGPoint location = {x, y};
 
-    x /= ratio_;
-    y /= ratio_;
-
     if (width_ > height_) {
         int t(x);
     if (width_ > height_) {
         int t(x);
-        x = height_ / ratio_ - 1 - y;
+        x = height_ - 1 - y;
         y = t;
 
         if (!iPad1_) {
         y = t;
 
         if (!iPad1_) {
-            x = height_ - x;
-            y = width_ - y;
+            x = height_ - 1 - x;
+            y = width_ - 1 - y;
         }
     }
 
         }
     }
 
+    x /= ratio_;
+    y /= ratio_;
+
     x_ = x; y_ = y;
     int diff = buttons_ ^ buttons;
     bool twas((buttons_ & 0x1) != 0);
     x_ = x; y_ = y;
     int diff = buttons_ ^ buttons;
     bool twas((buttons_ & 0x1) != 0);