fix mouse offset on notched screens

This commit is contained in:
Jesús A. Álvarez 2019-05-03 21:46:04 +02:00
parent e4c4d2f85c
commit 455db22df5
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ static ScreenView *sharedScreenView = nil;
screenBounds.origin.x = (viewBounds.size.width - screenBounds.size.width)/2;
screenBounds = CGRectIntegral(screenBounds);
videoLayer.frame = screenBounds;
screenBounds.origin.y = self.frame.origin.y;
BOOL scaleIsIntegral = (floor(screenScale) == screenScale);
NSString *screenFilter = scaleIsIntegral ? kCAFilterNearest : [[NSUserDefaults standardUserDefaults] stringForKey:@"screenFilter"];
videoLayer.magnificationFilter = screenFilter;