]> git.saurik.com Git - cydget.git/commitdiff
Fix menu button dim/undim logic on iOS 6.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 22 Mar 2013 07:39:49 +0000 (07:39 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 22 Mar 2013 07:39:49 +0000 (07:39 +0000)
Tweak.mm

index b33c21f3c8bffa5c5e72b498491e031153f4a8aa..1ab207893e06587e89445dcc9c6e23985c79a1c5 100644 (file)
--- a/Tweak.mm
+++ b/Tweak.mm
@@ -154,16 +154,24 @@ MSInstanceMessageHook0(BOOL, SBAwayController, handleMenuButtonTap) {
     return YES;
 }
 
-MSInstanceMessageHook0(void, SBAwayController, undimScreen) {
+static void Undim_(SBAwayController *self) {
     if ([self isDimmed]) {
         menu_ = false;
         [[cydgets_ objectAtIndex:active_] enableCydget:self];
         [[[self awayView] window] makeKeyWindow];
     }
+}
 
+MSInstanceMessageHook0(void, SBAwayController, undimScreen) {
+    Undim_(self);
     MSOldCall();
 }
 
+MSInstanceMessageHook1(void, SBAwayController, undimScreen, BOOL, undim) {
+    Undim_(self);
+    MSOldCall(undim);
+}
+
 static void Deactivate_(SBAwayController *self) {
     [[cydgets_ objectAtIndex:active_] disableCydget:self];
     active_ = 0;