Merge pull request #2030 from romulox-x/iosScreenSize

ios screen resolution
This commit is contained in:
punto- 2015-06-04 02:03:13 -03:00
commit 8dde67cf70

View file

@ -352,8 +352,9 @@ static void clear_touches() {
// Generate IDs for a framebuffer object and a color renderbuffer // Generate IDs for a framebuffer object and a color renderbuffer
UIScreen* mainscr = [UIScreen mainScreen]; UIScreen* mainscr = [UIScreen mainScreen];
printf("******** screen size %i, %i\n", (int)mainscr.currentMode.size.width, (int)mainscr.currentMode.size.height); printf("******** screen size %i, %i\n", (int)mainscr.currentMode.size.width, (int)mainscr.currentMode.size.height);
if (mainscr.currentMode.size.width == 640 || mainscr.currentMode.size.width == 960) // modern iphone, can go to 640x960 float minPointSize = MIN(mainscr.bounds.size.width, mainscr.bounds.size.height);
self.contentScaleFactor = 2.0; float minScreenSize = MIN(mainscr.currentMode.size.width, mainscr.currentMode.size.height);
self.contentScaleFactor = minScreenSize / minPointSize;
glGenFramebuffersOES(1, &viewFramebuffer); glGenFramebuffersOES(1, &viewFramebuffer);
glGenRenderbuffersOES(1, &viewRenderbuffer); glGenRenderbuffersOES(1, &viewRenderbuffer);