project_files/HedgewarsMobile/Classes/CommodityFunctions.m
changeset 4356 d1d26f8963a3
parent 4341 46b8791e577f
child 4510 ce9b8206e681
equal deleted inserted replaced
4354:c4e1820fa792 4356:d1d26f8963a3
    27 #import <QuartzCore/QuartzCore.h>
    27 #import <QuartzCore/QuartzCore.h>
    28 #import "AudioToolbox/AudioToolbox.h"
    28 #import "AudioToolbox/AudioToolbox.h"
    29 #import "PascalImports.h"
    29 #import "PascalImports.h"
    30 
    30 
    31 BOOL inline rotationManager (UIInterfaceOrientation interfaceOrientation) {
    31 BOOL inline rotationManager (UIInterfaceOrientation interfaceOrientation) {
    32     if (IS_IPAD())
    32     return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
    33         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
    33            (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
    34                (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
       
    35     else
       
    36         return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
       
    37 }
    34 }
    38 
    35 
    39 NSInteger inline randomPort () {
    36 NSInteger inline randomPort () {
    40     srandom(time(NULL));
    37     srandom(time(NULL));
    41     NSInteger res = (random() % 64511) + 1024;
    38     NSInteger res = (random() % 64511) + 1024;