mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Update ViewController.mm
Fix scale for iPhone 6 Plus
This commit is contained in:
1 parent
54a87800d3
commit
00173b7aee
1 file changed
+4
-2
@@ -21,6 +21,8 @@
|
||||
#include "gfx_es2/fbo.h"
|
||||
|
||||
#define IS_IPAD() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
|
||||
#define IS_IPHONE() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
|
||||
#define IS_IPHONE_6P() (IS_IPHONE() && [[UIScreen mainScreen] bounds].size.height == 736.0)
|
||||
|
||||
float dp_xscale = 1.0f;
|
||||
float dp_yscale = 1.0f;
|
||||
@@ -130,7 +132,7 @@ ViewController* sharedViewController;
|
||||
[EAGLContext setCurrentContext:self.context];
|
||||
self.preferredFramesPerSecond = 60;
|
||||
|
||||
float scale = [UIScreen mainScreen].scale;
|
||||
float scale = (IS_IPHONE_6P() ? 3.0f : [UIScreen mainScreen].scale);
|
||||
CGSize size = [[UIApplication sharedApplication].delegate window].frame.size;
|
||||
|
||||
if (size.height > size.width)
|
||||
@@ -227,7 +229,7 @@ ViewController* sharedViewController;
|
||||
{
|
||||
lock_guard guard(input_state.lock);
|
||||
|
||||
float scale = [UIScreen mainScreen].scale;
|
||||
float scale = (IS_IPHONE_6P() ? 3.0f : [UIScreen mainScreen].scale);
|
||||
|
||||
float scaledX = (int)(x * dp_xscale) * scale;
|
||||
float scaledY = (int)(y * dp_yscale) * scale;
|
||||
|
||||
Reference in new issue
Block a user