aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-05-19 09:11:18 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-05-19 09:11:18 +0100
commit81801ae21333d81a8e7887bc6b11c601b6ecbee6 (patch)
treead69acc6473284877733c7acb343a53a09b76c39 /ui
parent2a4c8c53dabf564142d5329b9ff8a82468324fd6 (diff)
ui/cocoa: Don't use NSWindow useOptimizedDrawing on OSX 10.10 and up
Starting in OSX 10.10, NSWindow useOptimizedDrawing is deprecated, so don't use it there. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1431296361-16981-6-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'ui')
-rw-r--r--ui/cocoa.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index e7b29e01f6..fade0fd524 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -36,6 +36,9 @@
#ifndef MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_10_6 1060
#endif
+#ifndef MAC_OS_X_VERSION_10_10
+#define MAC_OS_X_VERSION_10_10 101000
+#endif
//#define DEBUG
@@ -824,7 +827,9 @@ QemuCocoaView *cocoaView;
[normalWindow setAcceptsMouseMovedEvents:YES];
[normalWindow setTitle:[NSString stringWithFormat:@"QEMU"]];
[normalWindow setContentView:cocoaView];
+#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10)
[normalWindow useOptimizedDrawing:YES];
+#endif
[normalWindow makeKeyAndOrderFront:self];
[normalWindow center];
stretch_video = false;