equal
deleted
inserted
replaced
118 const char *gameArgs[11]; |
118 const char *gameArgs[11]; |
119 CGFloat width, height; |
119 CGFloat width, height; |
120 NSInteger enginePort = self.proto.enginePort; |
120 NSInteger enginePort = self.proto.enginePort; |
121 CGFloat screenScale = [[UIScreen mainScreen] safeScale]; |
121 CGFloat screenScale = [[UIScreen mainScreen] safeScale]; |
122 NSString *ipcString = [[NSString alloc] initWithFormat:@"%d",enginePort]; |
122 NSString *ipcString = [[NSString alloc] initWithFormat:@"%d",enginePort]; |
123 NSString *localeString = [[NSString alloc] initWithFormat:@"%@.txt",[[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]]; |
123 NSString *localeString = [[NSString alloc] initWithFormat:@"%@.txt",[[NSLocale preferredLanguages] objectAtIndex:0]]; |
124 NSUserDefaults *settings = [NSUserDefaults standardUserDefaults]; |
124 NSUserDefaults *settings = [NSUserDefaults standardUserDefaults]; |
125 |
125 |
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; |
161 |
161 |
162 gameArgs[ 0] = [ipcString UTF8String]; //ipcPort |
162 gameArgs[ 0] = [ipcString UTF8String]; //ipcPort |
163 gameArgs[ 1] = [horizontalSize UTF8String]; //cScreenWidth |
163 gameArgs[ 1] = [horizontalSize UTF8String]; //cScreenWidth |
164 gameArgs[ 2] = [verticalSize UTF8String]; //cScreenHeight |
164 gameArgs[ 2] = [verticalSize UTF8String]; //cScreenHeight |
165 gameArgs[ 3] = [[NSString stringWithFormat:@"%d",tmpQuality] UTF8String]; //quality |
165 gameArgs[ 3] = [[NSString stringWithFormat:@"%d",tmpQuality] UTF8String]; //quality |
166 gameArgs[ 4] = "en.txt";//[localeString UTF8String]; //cLocaleFName |
166 gameArgs[ 4] = [localeString UTF8String]; //cLocaleFName |
167 gameArgs[ 5] = [username UTF8String]; //UserNick |
167 gameArgs[ 5] = [username UTF8String]; //UserNick |
168 gameArgs[ 6] = [[[settings objectForKey:@"sound"] stringValue] UTF8String]; //isSoundEnabled |
168 gameArgs[ 6] = [[[settings objectForKey:@"sound"] stringValue] UTF8String]; //isSoundEnabled |
169 gameArgs[ 7] = [[[settings objectForKey:@"music"] stringValue] UTF8String]; //isMusicEnabled |
169 gameArgs[ 7] = [[[settings objectForKey:@"music"] stringValue] UTF8String]; //isMusicEnabled |
170 gameArgs[ 8] = [[[settings objectForKey:@"alternate"] stringValue] UTF8String]; //cAltDamage |
170 gameArgs[ 8] = [[[settings objectForKey:@"alternate"] stringValue] UTF8String]; //cAltDamage |
171 gameArgs[ 9] = [resourcePath UTF8String]; //PathPrefix |
171 gameArgs[ 9] = [resourcePath UTF8String]; //PathPrefix |