]> git.saurik.com Git - veency.git/commitdiff
Use MGGetBoolAnswer for opengles-2 check (Cykey).
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 25 Jan 2014 21:50:54 +0000 (21:50 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 25 Jan 2014 21:50:54 +0000 (21:50 +0000)
Tweak.mm
makefile

index 7b26ede7c9c7ea4b49228f618d6e35df8a3ec662..6ebe403f679340b830b9e8d24ebf5cf4414f56fb 100644 (file)
--- a/Tweak.mm
+++ b/Tweak.mm
@@ -590,6 +590,7 @@ extern "C" bool GSSystemHasCapability(NSString *);
 
 static CFTypeRef (*$GSSystemCopyCapability)(CFStringRef);
 static CFTypeRef (*$GSSystemGetCapability)(CFStringRef);
+static BOOL (*$MGGetBoolAnswer)(CFStringRef);
 
 static void VNCSetup() {
     rfbLogEnable(false);
@@ -616,6 +617,7 @@ static void VNCSetup() {
 
     $GSSystemCopyCapability = reinterpret_cast<CFTypeRef (*)(CFStringRef)>(dlsym(RTLD_DEFAULT, "GSSystemCopyCapability"));
     $GSSystemGetCapability = reinterpret_cast<CFTypeRef (*)(CFStringRef)>(dlsym(RTLD_DEFAULT, "GSSystemGetCapability"));
+    $MGGetBoolAnswer = reinterpret_cast<BOOL (*)(CFStringRef)>(dlsym(RTLD_DEFAULT, "MGGetBoolAnswer"));
 
     CFTypeRef opengles2;
 
@@ -625,6 +627,9 @@ static void VNCSetup() {
         opengles2 = (*$GSSystemGetCapability)(CFSTR("opengles-2"));
         if (opengles2 != NULL)
             CFRetain(opengles2);
+    } else if ($MGGetBoolAnswer != NULL) {
+        opengles2 = $MGGetBoolAnswer(CFSTR("opengles-2")) ? kCFBooleanTrue : kCFBooleanFalse;
+        CFRetain(opengles2);
     } else
         opengles2 = NULL;
 
index d9368ec616d271465cc9cf61a4be2a59ca9ee09f..97e4fc440dd3a0e5e17f21f51836971324696b09 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,6 +1,6 @@
 name := Veency
 id := vncs
-flags := -lvncserver -framework IOMobileFramebuffer -framework CoreSurface -framework IOKit -framework GraphicsServices -I/apl/inc/iPhoneOS-2.0 -framework QuartzCore -weak_reference_mismatches weak -framework UIKit -framework GraphicsServices
+flags := -lvncserver -framework IOMobileFramebuffer -framework CoreSurface -framework IOKit -framework GraphicsServices -I/apl/inc/iPhoneOS-2.0 -framework QuartzCore -weak_reference_mismatches weak
 flags += -fvisibility=hidden
 flags += SpringBoardAccess.c
 base := ../tweaks