]> git.saurik.com Git - veency.git/commitdiff
Carve out a new function for the IOHID input code.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 27 Jan 2014 03:00:00 +0000 (19:00 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 27 Jan 2014 03:00:00 +0000 (19:00 -0800)
CoreFoundation/CFUserNotification.h [deleted symlink]
Tweak.mm
include/CoreFoundation/CFUserNotification.h [new symlink]

diff --git a/CoreFoundation/CFUserNotification.h b/CoreFoundation/CFUserNotification.h
deleted file mode 120000 (symlink)
index 4007e0d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFUserNotification.h
\ No newline at end of file
index 0d49df74b63910e8bfcdb8faa57da17a17112497..807022ff93abada61b5e77bcf62f2d9f78c289ba 100644 (file)
--- a/Tweak.mm
+++ b/Tweak.mm
@@ -428,6 +428,9 @@ struct VeencyEvent {
     } data;
 };
 
+static void VNCPointerOld(int buttons, int x, int y, CGPoint location, int diff, bool twas, bool tis);
+static void VNCPointerNew(int buttons, int x, int y, CGPoint location, int diff, bool twas, bool tis);
+
 static void VNCPointer(int buttons, int x, int y, rfbClientPtr client) {
     if (ratio_ == 0)
         return;
@@ -461,6 +464,13 @@ static void VNCPointer(int buttons, int x, int y, rfbClientPtr client) {
         return;
     }
 
+    if (kCFCoreFoundationVersionNumber >= 800)
+        return VNCPointerNew(buttons, x, y, location, diff, twas, tis);
+    else
+        return VNCPointerOld(buttons, x, y, location, diff, twas, tis);
+}
+
+static void VNCPointerOld(int buttons, int x, int y, CGPoint location, int diff, bool twas, bool tis) {
     mach_port_t purple(0);
 
     if ((diff & 0x10) != 0) {
@@ -561,6 +571,9 @@ static void VNCPointer(int buttons, int x, int y, rfbClientPtr client) {
         mach_port_deallocate(mach_task_self(), purple);
 }
 
+static void VNCPointerNew(int buttons, int x, int y, CGPoint location, int diff, bool twas, bool tis) {
+}
+
 GSEventRef (*$GSEventCreateKeyEvent)(int, CGPoint, CFStringRef, CFStringRef, id, UniChar, short, short);
 GSEventRef (*$GSCreateSyntheticKeyEvent)(UniChar, BOOL, BOOL);
 
diff --git a/include/CoreFoundation/CFUserNotification.h b/include/CoreFoundation/CFUserNotification.h
new file mode 120000 (symlink)
index 0000000..4007e0d
--- /dev/null
@@ -0,0 +1 @@
+/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFUserNotification.h
\ No newline at end of file