1
運行SDL的演示,我注意到iPhone 5/5s上的屏幕,iPhone 6/6 Plus未顯示爲全尺寸。屏幕頂部和底部有黑條。無論選擇哪種手機模擬器,SDL顯示屏均爲320×480。SDL在iPhone 5/6/6上不顯示全屏+
這裏是打印出來的SDL_uikitappdelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"Screen size: (%f, %f)", [UIScreen mainScreen].nativeBounds.size.width, [UIScreen mainScreen].nativeBounds.size.height);
UIScreen *mainScreen = [UIScreen mainScreen];
NSLog(@"Screen bounds: %@, Screen resolution: %@, scale: %f, nativeScale: %f",
NSStringFromCGRect(mainScreen.bounds), mainScreen.coordinateSpace, mainScreen.scale, mainScreen.nativeScale);
}
2014-10-11 17:09:21.267 Happy[18363:725719] Screen size: (640.000000, 960.000000)
2014-10-11 17:09:21.268 Happy[18363:725719] Screen bounds: {{0, 0}, {320, 480}}, Screen resolution: <UIScreen: 0x7feab951f1a0; bounds = {{0, 0}, {320, 480}}; mode = <UIScreenMode: 0x7feab9619420; size = 640.000000 x 960.000000>>, scale: 2.000000, nativeScale: 2.000000
注意application:didFinishLaunchingWithOptions
SDL_init()
和SDL_CreateWindow()
之前執行。
我期待下面的iPhone屏幕尺寸:
iPhone5 = 320x568,
iPhone6 = 375x667,
iPhone6 Plus = 414x736
任何人有想法,爲什麼和如何使它全屏?