project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6624 e049b5bb0ad1
parent 6615 65602f1ef0f8
child 6656 6aeaba3ee584
equal deleted inserted replaced
6623:6bf169f1e97c 6624:e049b5bb0ad1
   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 preferredLanguages] objectAtIndex:0]];
   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     CGRect screenBounds = [[UIScreen mainScreen] safeBounds];
   127         CGRect screenBounds = [[[UIScreen screens] objectAtIndex:1] bounds];
   127     width = screenBounds.size.width;
   128         width = screenBounds.size.width;
   128     height = screenBounds.size.height;
   129         height = screenBounds.size.height;
       
   130     } else {
       
   131         CGRect screenBounds = [[UIScreen mainScreen] safeBounds];
       
   132         width = screenBounds.size.width;
       
   133         height = screenBounds.size.height;
       
   134     }
       
   135 
   129 
   136     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)];
   130     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)];
   137     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", (int)(height * screenScale)];
   131     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", (int)(height * screenScale)];
   138     NSString *resourcePath = [[NSString alloc] initWithFormat:@"%@/Data", [[NSBundle mainBundle] resourcePath]];
   132     NSString *resourcePath = [[NSString alloc] initWithFormat:@"%@/Data", [[NSBundle mainBundle] resourcePath]];
   139 
   133