]> git.saurik.com Git - cydget.git/commitdiff
Only do the Cydget setup once (this is important).
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 18 Feb 2014 05:47:51 +0000 (21:47 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 18 Feb 2014 05:47:51 +0000 (21:47 -0800)
CydgetLoader.mm

index 2e7081657ac0301e779bf6fdae9f89fc415e2b61..adf5b9dca09c3b10e64f04c04773f6491ea190b8 100644 (file)
@@ -354,8 +354,14 @@ static void CydgetSetup() {
 // XXX: this could happen while it is unlocked
 MSInstanceMessageHook1(id, SBLockScreenView, initWithFrame, CGRect, frame) {
     self = MSOldCall(frame);
 // XXX: this could happen while it is unlocked
 MSInstanceMessageHook1(id, SBLockScreenView, initWithFrame, CGRect, frame) {
     self = MSOldCall(frame);
-    CydgetSetup();
-    Activate_();
+
+    static bool loaded(false);
+    if (!loaded) {
+        loaded = true;
+        CydgetSetup();
+        Activate_();
+    }
+
     return self;
 }
 
     return self;
 }