From 816cc6f6372145bbe35e81dbe240d356a80ca563 Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Wed, 30 Mar 2011 20:31:09 +0200 Subject: [PATCH] Fix compilation issues with 10.5 --- src/SFML/Window/OSX/SFWindowController.mm | 1 + src/SFML/Window/OSX/cg_sf_conversion.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/SFML/Window/OSX/SFWindowController.mm b/src/SFML/Window/OSX/SFWindowController.mm index 4aa87332..f46a9f6a 100644 --- a/src/SFML/Window/OSX/SFWindowController.mm +++ b/src/SFML/Window/OSX/SFWindowController.mm @@ -37,6 +37,7 @@ #import #import #import +#import //////////////////////////////////////////////////////////// /// SFWindowController class : Privates Methods Declaration diff --git a/src/SFML/Window/OSX/cg_sf_conversion.cpp b/src/SFML/Window/OSX/cg_sf_conversion.cpp index d8d5810d..7de2659b 100644 --- a/src/SFML/Window/OSX/cg_sf_conversion.cpp +++ b/src/SFML/Window/OSX/cg_sf_conversion.cpp @@ -96,14 +96,14 @@ VideoMode ConvertCGModeToSFMode(CFDictionaryRef dictionary) { VideoMode sfmode; - CFNumberRef cfnumber = (CFNumberRef)CFDictionaryGetValue(CurrentMode, kCGDisplayWidth); - CFNumberGetValue(cfnumber, kCFNumberIntType, &(mode.Width)); + CFNumberRef cfnumber = (CFNumberRef)CFDictionaryGetValue(dictionary, kCGDisplayWidth); + CFNumberGetValue(cfnumber, kCFNumberIntType, &(sfmode.Width)); - cfnumber = (CFNumberRef)CFDictionaryGetValue(CurrentMode, kCGDisplayHeight); - CFNumberGetValue(cfnumber, kCFNumberIntType, &(mode.Height)); + cfnumber = (CFNumberRef)CFDictionaryGetValue(dictionary, kCGDisplayHeight); + CFNumberGetValue(cfnumber, kCFNumberIntType, &(sfmode.Height)); - cfnumber = (CFNumberRef)CFDictionaryGetValue(CurrentMode, kCGDisplayBitsPerPixel); - CFNumberGetValue(cfnumber, kCFNumberIntType, &(mode.BitsPerPixel)); + cfnumber = (CFNumberRef)CFDictionaryGetValue(dictionary, kCGDisplayBitsPerPixel); + CFNumberGetValue(cfnumber, kCFNumberIntType, &(sfmode.BitsPerPixel)); return sfmode; } @@ -129,7 +129,7 @@ CFDictionaryRef ConvertSFModeToCGMode(VideoMode sfmode) return CGDisplayBestModeForParameters(CGMainDisplayID(), sfmode.BitsPerPixel, sfmode.Width, - sfmode.Height + sfmode.Height, NULL); }