Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit f51ef94

Browse files
authored
Merge pull request #264 from UnityTech/revert-263-iosdevicescale
Revert "adjust screen scale for some ios devices"
2 parents 2d59a06 + 189c927 commit f51ef94

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
#import <UIKit/UIKit.h>
2-
#import "UIWidgetsDevice.h"
32
extern "C"
43
{
5-
float IOSDeviceScaleFactor()
4+
int IOSDeviceScaleFactor()
65
{
7-
float scale = [[UIScreen mainScreen] scale] * 1.0;
8-
if ([UIWidgetsDevice NeedScreenDownSample]) {
9-
scale *= 0.8696;
10-
}
11-
return scale;
6+
return [[UIScreen mainScreen] scale];
127
}
138
}

Runtime/engine/DisplayMetrics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static float AndroidDevicePixelRatio() {
187187

188188
#if UNITY_IOS
189189
[DllImport("__Internal")]
190-
static extern float IOSDeviceScaleFactor();
190+
static extern int IOSDeviceScaleFactor();
191191

192192
[DllImport("__Internal")]
193193
static extern viewMetrics IOSGetViewportPadding();

0 commit comments

Comments
 (0)