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); }