mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Update ViewController.mm
Fix scale for iPhone 6 Plus
This commit is contained in:
parent
54a87800d3
commit
00173b7aee
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue