project_files/HedgewarsMobile/Classes/CommodityFunctions.m
changeset 3551 d4de36b3801a
parent 3547 02875b1145b7
child 3573 c84067629035
equal deleted inserted replaced
3550:149416b948fc 3551:d4de36b3801a
   111     [schemeFile release];
   111     [schemeFile release];
   112     [theScheme release];
   112     [theScheme release];
   113 }
   113 }
   114 
   114 
   115 BOOL rotationManager (UIInterfaceOrientation interfaceOrientation) {
   115 BOOL rotationManager (UIInterfaceOrientation interfaceOrientation) {
   116     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
   116     return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
   117         return YES;
   117            (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);  
   118     else
       
   119         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
       
   120                (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);  
       
   121 }
   118 }
   122 
   119 
   123 NSInteger randomPort () {
   120 NSInteger randomPort () {
   124     srandom(time(NULL));
   121     srandom(time(NULL));
   125     return (random() % 64511) + 1024;
   122     return (random() % 64511) + 1024;