mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2024-12-01 18:50:59 +00:00
round scale up to 1.0 if it's > 0.9
This commit is contained in:
parent
97ab910a84
commit
097ac4e64d
@ -52,6 +52,9 @@ static ScreenView *sharedScreenView = nil;
|
|||||||
[super layoutSubviews];
|
[super layoutSubviews];
|
||||||
CGRect viewBounds = self.bounds;
|
CGRect viewBounds = self.bounds;
|
||||||
CGFloat screenScale = MAX(screenSize.width / viewBounds.size.width, screenSize.height / viewBounds.size.height);
|
CGFloat screenScale = MAX(screenSize.width / viewBounds.size.width, screenSize.height / viewBounds.size.height);
|
||||||
|
if (screenScale > 0.9 && screenScale <= 1.0) {
|
||||||
|
screenScale = 1.0;
|
||||||
|
}
|
||||||
screenBounds = CGRectMake(0, 0, screenSize.width / screenScale, screenSize.height / screenScale);
|
screenBounds = CGRectMake(0, 0, screenSize.width / screenScale, screenSize.height / screenScale);
|
||||||
screenBounds.origin.x = (viewBounds.size.width - screenBounds.size.width)/2;
|
screenBounds.origin.x = (viewBounds.size.width - screenBounds.size.width)/2;
|
||||||
screenBounds = CGRectIntegral(screenBounds);
|
screenBounds = CGRectIntegral(screenBounds);
|
||||||
|
Loading…
Reference in New Issue
Block a user