diff options
author | Thierry Crozat | 2012-11-18 01:26:26 +0000 |
---|---|---|
committer | Thierry Crozat | 2012-11-18 01:29:09 +0000 |
commit | 67493394b3d0a3d9595f284898ba586271a26d41 (patch) | |
tree | 51204365b5f966de0617b45d1c0961dd6267d3a8 | |
parent | 40941af7b9ffeeee0e328fc86e5749b9043c9113 (diff) | |
download | scummvm-rg350-67493394b3d0a3d9595f284898ba586271a26d41.tar.gz scummvm-rg350-67493394b3d0a3d9595f284898ba586271a26d41.tar.bz2 scummvm-rg350-67493394b3d0a3d9595f284898ba586271a26d41.zip |
OSX: Remove use of deprecated methods
FSRef and FSPathMakeRef have been deprecated in OS X 10.8. So we
use CFURLRef instead.
-rw-r--r-- | backends/platform/sdl/macosx/macosx.cpp | 11 |
1 files 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; } |