--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Sun Jan 29 02:45:12 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Sun Jan 29 02:48:03 2012 +0100
@@ -129,8 +129,14 @@
height = screenBounds.size.height;
} else {
CGRect screenBounds = [[UIScreen mainScreen] bounds];
- width = screenBounds.size.height;
- height = screenBounds.size.width;
+ UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
+ if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) {
+ width = screenBounds.size.height;
+ height = screenBounds.size.width;
+ } else {
+ width = screenBounds.size.width;
+ height = screenBounds.size.height;
+ }
}
NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)];