From 7a42df871255ae8f3c1bab13dc3e87e642d262ac Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 28 Apr 2013 09:50:46 +0200 Subject: cocoa_common: fix window sizing The code was attempting to get the ceiling of the double. Too bad NSSize has floats inside of it and the int cast is nowhere to be seen. This caused rounding errors by one pixel in the window size. --- video/out/cocoa_common.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index ee451ed1dc..8e06e637a4 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -924,9 +924,9 @@ void create_menu() s.height -= [self titleHeight]; if (s.width > s.height) { - s.width = ((double)s.height * ratio + 0.5); + s.width = ((double)s.height * ratio); } else { - s.height = ((double)s.width * 1/ratio + 0.5); + s.height = ((double)s.width * 1.0/ratio); } s.height += [self titleHeight]; -- cgit v1.2.3