summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CyteKit/ViewController.mm8
-rw-r--r--MobileCydia.mm4
-rw-r--r--iPhonePrivate.h11
3 files changed, 23 insertions, 0 deletions
diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm
index df2ba61..edd87ca 100644
--- a/CyteKit/ViewController.mm
+++ b/CyteKit/ViewController.mm
@@ -112,6 +112,14 @@ extern bool IsWildcat_;
return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
}
+- (NSUInteger) supportedInterfaceOrientations {
+ return IsWildcat_ ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskPortrait;
+}
+
+- (BOOL) shouldAutorotate {
+ return YES;
+}
+
- (void) setPageColor:(UIColor *)color {
if (color == nil) {
color = [UIColor groupTableViewBackgroundColor];
diff --git a/MobileCydia.mm b/MobileCydia.mm
index aa8ad52..8a9590d 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -9573,6 +9573,8 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
return;
[window_ addSubview:[tabbar_ view]];
+ if ([window_ respondsToSelector:@selector(setRootViewController:)])
+ [window_ setRootViewController:tabbar_];
[[emulated_ view] removeFromSuperview];
emulated_ = nil;
[window_ setUserInteractionEnabled:YES];
@@ -10282,6 +10284,8 @@ _trace();
emulated_ = [[[CydiaLoadingViewController alloc] init] autorelease];
[window_ addSubview:[emulated_ view]];
+ if ([window_ respondsToSelector:@selector(setRootViewController:)])
+ [window_ setRootViewController:emulated_];
[self performSelector:@selector(loadData) withObject:nil afterDelay:0];
_trace();
diff --git a/iPhonePrivate.h b/iPhonePrivate.h
index 6f4e706..37e73d6 100644
--- a/iPhonePrivate.h
+++ b/iPhonePrivate.h
@@ -418,6 +418,17 @@ extern float const UIScrollViewDecelerationRateNormal;
- (WebFrame *) contentFrame;
@end
+typedef enum {
+ UIInterfaceOrientationMaskPortrait = (1 << UIInterfaceOrientationPortrait),
+ UIInterfaceOrientationMaskLandscapeLeft = (1 << UIInterfaceOrientationLandscapeLeft),
+ UIInterfaceOrientationMaskLandscapeRight = (1 << UIInterfaceOrientationLandscapeRight),
+ UIInterfaceOrientationMaskPortraitUpsideDown = (1 << UIInterfaceOrientationPortraitUpsideDown),
+ UIInterfaceOrientationMaskLandscape = (UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight),
+ UIInterfaceOrientationMaskAll = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft |
+ UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortraitUpsideDown),
+ UIInterfaceOrientationMaskAllButUpsideDown = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight),
+} UIInterfaceOrientationMask;
+
// extern *; {{{
extern CFStringRef const kGSDisplayIdentifiersCapability;
extern float const UIWebViewGrowsAndShrinksToFitHeight;