From 67493394b3d0a3d9595f284898ba586271a26d41 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 18 Nov 2012 01:26:26 +0000 Subject: OSX: Remove use of deprecated methods FSRef and FSPathMakeRef have been deprecated in OS X 10.8. So we use CFURLRef instead. --- backends/platform/sdl/macosx/macosx.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index fb76c111f2..85342d62fd 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -39,7 +39,6 @@ #include "ApplicationServices/ApplicationServices.h" // for LSOpenFSRef #include "CoreFoundation/CoreFoundation.h" // for CF* stuff -#include "CoreServices/CoreServices.h" // for FSPathMakeRef OSystem_MacOSX::OSystem_MacOSX() : @@ -107,13 +106,9 @@ bool OSystem_MacOSX::displayLogFile() { if (_logFilePath.empty()) return false; - FSRef ref; - OSStatus err; - - err = FSPathMakeRef((const UInt8 *)_logFilePath.c_str(), &ref, NULL); - if (err == noErr) { - err = LSOpenFSRef(&ref, NULL); - } + CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)_logFilePath.c_str(), _logFilePath.size(), false); + OSStatus err = LSOpenCFURLRef(url, NULL); + CFRelease(url); return err != noErr; } -- cgit v1.2.3