Skip to content

Commit

Permalink
OSX: Remove use of deprecated methods
Browse files Browse the repository at this point in the history
FSRef and FSPathMakeRef have been deprecated in OS X 10.8. So we
use CFURLRef instead.
  • Loading branch information
criezy committed Nov 18, 2012
1 parent 40941af commit 6749339
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions backends/platform/sdl/macosx/macosx.cpp
Expand Up @@ -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()
:
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 6749339

Please sign in to comment.