From c49e9b51af4c57e67dbb4a88397cc69bcd23d7e6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 Nov 2013 00:10:00 +0100 Subject: [PATCH] (OSX) Snow Leopard backwards compatibility - NSScreen implementation - bounds function - first convert NSRect to CGRect, then use CGRectGet* functions on them --- apple/common/RAGameView.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apple/common/RAGameView.m b/apple/common/RAGameView.m index 9e6da80264..bd0a3bc6d1 100644 --- a/apple/common/RAGameView.m +++ b/apple/common/RAGameView.m @@ -47,7 +47,12 @@ @interface NSScreen (IOSCompat) @end @implementation NSScreen (IOSCompat) -- (CGRect)bounds { return CGRectMake(0, 0, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame)); } +- (CGRect)bounds +{ + CGRect rect_width = NSRectToCGRect(self.frame); + CGRect rect_height = NSRectToCGRect(self.frame); + return CGRectMake(0, 0, CGRectGetWidth(rect_width), CGRectGetHeight(rect_height)); +} - (float) scale { return 1.0f; } @end