equal
deleted
inserted
replaced
126 if (IS_DUALHEAD()) { |
126 if (IS_DUALHEAD()) { |
127 CGRect screenBounds = [[[UIScreen screens] objectAtIndex:1] bounds]; |
127 CGRect screenBounds = [[[UIScreen screens] objectAtIndex:1] bounds]; |
128 width = screenBounds.size.width; |
128 width = screenBounds.size.width; |
129 height = screenBounds.size.height; |
129 height = screenBounds.size.height; |
130 } else { |
130 } else { |
131 CGRect screenBounds = [[UIScreen mainScreen] bounds]; |
131 CGRect screenBounds = [[UIScreen mainScreen] safeBounds]; |
132 UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; |
132 width = screenBounds.size.width; |
133 if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) { |
133 height = screenBounds.size.height; |
134 width = screenBounds.size.height; |
|
135 height = screenBounds.size.width; |
|
136 } else { |
|
137 width = screenBounds.size.width; |
|
138 height = screenBounds.size.height; |
|
139 } |
|
140 } |
134 } |
141 |
135 |
142 NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)]; |
136 NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)]; |
143 NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", (int)(height * screenScale)]; |
137 NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", (int)(height * screenScale)]; |
144 NSString *resourcePath = [[NSString alloc] initWithFormat:@"%@/Data", [[NSBundle mainBundle] resourcePath]]; |
138 NSString *resourcePath = [[NSString alloc] initWithFormat:@"%@/Data", [[NSBundle mainBundle] resourcePath]]; |