project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 5709 36cf87a4f6ae
parent 5696 972bf04d4a79
child 6000 dbcebcd3d79f
equal deleted inserted replaced
5707:6719291070ed 5709:36cf87a4f6ae
    76         CGRect screenBounds = [[UIScreen mainScreen] bounds];
    76         CGRect screenBounds = [[UIScreen mainScreen] bounds];
    77         width = (int) screenBounds.size.height;
    77         width = (int) screenBounds.size.height;
    78         height = (int) screenBounds.size.width;
    78         height = (int) screenBounds.size.width;
    79     }
    79     }
    80 
    80 
    81     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", width];
    81     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", width * (int)getScreenScale()];
    82     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", height];
    82     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", height * (int)getScreenScale()];
    83     NSString *rotation = [[NSString alloc] initWithString:@"0"];
    83     NSString *rotation = [[NSString alloc] initWithString:@"0"];
    84 
    84 
    85     NSString *modelId = getModelType();
    85     NSString *modelId = getModelType();
    86     NSInteger tmpQuality;
    86     NSInteger tmpQuality;
    87     if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"])     // = iPhone and iPhone 3G or iPod Touch or iPod Touch 2G
    87     if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"])     // = iPhone and iPhone 3G or iPod Touch or iPod Touch 2G
    88         tmpQuality = 0x00000001 | 0x00000002 | 0x00000008 | 0x00000040;                 // rqLowRes | rqBlurryLand | rqSimpleRope | rqKillFlakes
    88         tmpQuality = 0x00000001 | 0x00000002 | 0x00000008 | 0x00000040;                 // rqLowRes | rqBlurryLand | rqSimpleRope | rqKillFlakes
    89     else if ([modelId hasPrefix:@"iPhone2"] || [modelId hasPrefix:@"iPod3"])                                    // = iPhone 3GS or iPod Touch 3G
    89     else if ([modelId hasPrefix:@"iPhone2"] || [modelId hasPrefix:@"iPod3"])                                    // = iPhone 3GS or iPod Touch 3G
    90         tmpQuality = 0x00000002 | 0x00000040;                                           // rqBlurryLand | rqKillFlakes
    90         tmpQuality = 0x00000002 | 0x00000040;                                           // rqBlurryLand | rqKillFlakes
    91     else if ([modelId hasPrefix:@"iPad1"] || [modelId hasPrefix:@"iPod4"])                    // = iPad 1G or iPod Touch 4G
    91     else if ([modelId hasPrefix:@"iPad1"] || [modelId hasPrefix:@"iPod4"])                                      // = iPad 1G or iPod Touch 4G
    92         tmpQuality = 0x00000002;                                                        // rqBlurryLand
    92         tmpQuality = 0x00000002;                                                        // rqBlurryLand
    93     else                                                                                                        // = everything else
    93     else                                                                                                        // = everything else
    94         tmpQuality = 0;                                                                 // full quality
    94         tmpQuality = 0;                                                                 // full quality
    95 
    95 
    96     // disable tooltips on iPhone
    96     // disable tooltips on iPhone