diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-12-02 06:23:02 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-12-03 01:16:44 -0800 |
commit | 0e371502fd57d5754c54d36d7ec29e8ef5bc6ae1 (patch) | |
tree | 61bf03f6bb5ce63a3804d136209de580ee04cfbe | |
parent | 0e1784b407f7de937a24bcf2fc5a2d9ef825f7bf (diff) |
Prefer SBReboot() (when available) to system("reboot").
-rw-r--r-- | MobileCydia.mm | 5 | ||||
-rw-r--r-- | iPhonePrivate.h | 1 | ||||
-rw-r--r-- | makefile | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 872e818..6121e6e 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4449,7 +4449,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { break; case 4: - system("reboot"); + if (void (*SBReboot)(mach_port_t) = reinterpret_cast<void (*)(mach_port_t)>(dlsym(RTLD_DEFAULT, "SBReboot"))) + SBReboot(SBSSpringBoardServerPort()); + else + system("reboot"); break; } } diff --git a/iPhonePrivate.h b/iPhonePrivate.h index e6a79dc..9778f9d 100644 --- a/iPhonePrivate.h +++ b/iPhonePrivate.h @@ -350,6 +350,7 @@ extern float const UIWebViewGrowsAndShrinksToFitHeight; extern float const UIWebViewScalesToFitScale; // }}} // extern "C" *(); {{{ +extern "C" mach_port_t SBSSpringBoardServerPort(); extern "C" UIImage *_UIImageWithName(NSString *name); extern "C" void UISetColor(CGColorRef color); // }}} @@ -30,6 +30,7 @@ link += -framework GraphicsServices link += -framework IOKit link += -framework JavaScriptCore link += -framework QuartzCore +link += -framework SpringBoardServices link += -framework SystemConfiguration link += -framework WebCore link += -framework WebKit |