aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/sdl/macosx/macosx.cpp11
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;
}