mirror of
https://github.com/fltk/fltk.git
synced 2026-05-22 07:01:34 +08:00
Removed deprecation warning for FSCompareFSRefs().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9684 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+6
-14
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user