project_files/HedgewarsMobile/Classes/DefinesAndMacros.h
changeset 6671 5532d5f6285c
parent 6624 e049b5bb0ad1
child 6700 e04da46ee43c
--- a/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h	Sat Feb 11 19:24:09 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h	Sun Feb 12 10:08:58 2012 +0100
@@ -75,6 +75,7 @@
 #define MSG_DIDUNLOAD()         DLog(@"unloaded");
 
 #define IS_IPAD()               (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+#define IS_ON_PORTRAIT()        (IS_IPAD() && UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]))
 #define IS_NOT_POWERFUL(x)      ([x hasPrefix:@"iPhone1"] || [x hasPrefix:@"iPod1,1"] || [x hasPrefix:@"iPod2,1"])
 #define IS_NOT_VERY_POWERFUL(x) ([x hasPrefix:@"iPad1"] || [x hasPrefix:@"iPhone2"] || [x hasPrefix:@"iPod3"] || [x hasPrefix:@"iPod4"])
 #define IS_VERY_POWERFUL(x)     (IS_NOT_POWERFUL(x) == NO && IS_NOT_VERY_POWERFUL(x) == NO)