From: Jay Freeman (saurik) Date: Sat, 2 Jun 2012 22:26:06 +0000 (+0000) Subject: Correct mistake in the iPad3 coordinate transform. X-Git-Tag: v0.9.3379~1 X-Git-Url: https://git.saurik.com/veency.git/commitdiff_plain/a1d2fbfa39f6265ca79c275c3e17d46e3f020ff8?ds=sidebyside Correct mistake in the iPad3 coordinate transform. --- diff --git a/Tweak.mm b/Tweak.mm index 3b76f06..a99c7e9 100644 --- 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}; - x /= ratio_; - y /= ratio_; - if (width_ > height_) { int t(x); - x = height_ / ratio_ - 1 - y; + x = height_ - 1 - y; 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);