Skip to content

Commit ae59c77

Browse files
committed
Merge pull request #21 from upsuper/patch-1
fix blurry image
2 parents f42c52a + 7a48c82 commit ae59c77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MPlayerX/DisplayLayer.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,17 +215,17 @@ -(void) reshape
215215
CGFloat sAspect = [self aspectRatio];
216216

217217
if (((sAspect * rc.size.height) > rc.size.width) == fillScreen) {
218-
rc.size.width = rc.size.height * sAspect;
218+
rc.size.width = round(rc.size.height * sAspect);
219219
} else {
220-
rc.size.height = rc.size.width / sAspect;
220+
rc.size.height = round(rc.size.width / sAspect);
221221
}
222222

223223
if (scaleEnabled) {
224224
rc.size.width *= renderRatio.size.width;
225225
rc.size.height *= renderRatio.size.height;
226226
}
227227

228-
self.bounds = rc;
228+
self.bounds = CGRectIntegral(rc);
229229

230230
flagAspectRatioChanged = NO;
231231
flagFillScrnChanged = NO;

0 commit comments

Comments
 (0)