static bool AprilFools_;
+static void (*$SBSSetInterceptsMenuButtonForever)(bool);
+
static bool IsReachable(const char *name) {
SCNetworkReachabilityFlags flags; {
SCNetworkReachabilityRef reachability(SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, name));
@implementation Cydia
- (void) lockSuspend {
- ++locked_;
+ if (locked_++ == 0) {
+ if ($SBSSetInterceptsMenuButtonForever != NULL)
+ (*$SBSSetInterceptsMenuButtonForever)(true);
+ }
}
- (void) unlockSuspend {
- --locked_;
+ if (--locked_ == 0) {
+ if ($SBSSetInterceptsMenuButtonForever != NULL)
+ (*$SBSSetInterceptsMenuButtonForever)(false);
+ }
}
- (void) beginUpdate {
//UIKeyboardDisableAutomaticAppearance();
/* }}} */
+ $SBSSetInterceptsMenuButtonForever = reinterpret_cast<void (*)(bool)>(dlsym(RTLD_DEFAULT, "SBSSetInterceptsMenuButtonForever"));
+
BOOL (*GSSystemHasCapability)(CFStringRef) = reinterpret_cast<BOOL (*)(CFStringRef)>(dlsym(RTLD_DEFAULT, "GSSystemHasCapability"));
bool fast = GSSystemHasCapability != NULL && GSSystemHasCapability(CFSTR("armv7"));