summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-04-28 09:50:46 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-04-28 09:55:06 +0200
commit7a42df871255ae8f3c1bab13dc3e87e642d262ac (patch)
tree0e0efe2d5f10dc7aa3da86f6fc546ce7cdc36e4e /video
parentd500297377d09a9711b8840cc6f4fb09a67b8f69 (diff)
downloadmpv-7a42df871255ae8f3c1bab13dc3e87e642d262ac.tar.bz2
mpv-7a42df871255ae8f3c1bab13dc3e87e642d262ac.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/cocoa_common.m4
1 files changed, 2 insertions, 2 deletions
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];