mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 02:46: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 ) &&
|
if ( !GetCurrentProcess( &cur_psn ) && !GetFrontProcess( &front_psn ) &&
|
||||||
!SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn ) {
|
!SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn ) {
|
||||||
// only transform the application type for unbundled apps
|
// only transform the application type for unbundled apps
|
||||||
CFBundleRef bundle = CFBundleGetMainBundle();
|
NSBundle *bundle = [NSBundle mainBundle];
|
||||||
if ( bundle ) {
|
if (bundle) {
|
||||||
FSRef execFs;
|
NSString *exe = [bundle executablePath];
|
||||||
CFURLRef execUrl = CFBundleCopyExecutableURL( bundle );
|
NSString *bpath = [bundle bundlePath];
|
||||||
CFURLGetFSRef( execUrl, &execFs );
|
if ([bpath isEqualToString:exe]) bundle = nil;
|
||||||
|
}
|
||||||
FSRef bundleFs;
|
|
||||||
GetProcessBundleLocation( &cur_psn, &bundleFs );
|
|
||||||
|
|
||||||
if ( !FSCompareFSRefs( &execFs, &bundleFs ) )
|
|
||||||
bundle = NULL;
|
|
||||||
|
|
||||||
CFRelease(execUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !bundle )
|
if ( !bundle )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user