diff options
| author | Manolo Gouy <Manolo> | 2012-09-26 14:34:02 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2012-09-26 14:34:02 +0000 |
| commit | 6ec40d36769f42a31ff81279389c98ea3a4a666b (patch) | |
| tree | ff0d629eed8b267bd4c6a8bc6e2c72717ca9ca8f /src | |
| parent | e59cab29d30f9704a5b3a2f3e7001c3cecb05de6 (diff) | |
Removed deprecation warning for FSCompareFSRefs().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9684 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 6d3defed7..d4a1c553d 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1331,20 +1331,12 @@ void fl_open_display() { if ( !GetCurrentProcess( &cur_psn ) && !GetFrontProcess( &front_psn ) && !SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn ) { // only transform the application type for unbundled apps - CFBundleRef bundle = CFBundleGetMainBundle(); - if ( bundle ) { - FSRef execFs; - CFURLRef execUrl = CFBundleCopyExecutableURL( bundle ); - CFURLGetFSRef( execUrl, &execFs ); - - FSRef bundleFs; - GetProcessBundleLocation( &cur_psn, &bundleFs ); - - if ( !FSCompareFSRefs( &execFs, &bundleFs ) ) - bundle = NULL; - - CFRelease(execUrl); - } + NSBundle *bundle = [NSBundle mainBundle]; + if (bundle) { + NSString *exe = [bundle executablePath]; + NSString *bpath = [bundle bundlePath]; + if ([bpath isEqualToString:exe]) bundle = nil; + } if ( !bundle ) { |
