Changeset 06ecc0b06606d780410b41770840c4eeb6032135

Show
Ignore:
Timestamp:
15/12/05 02:44:00 (3 years ago)
Author:
Derk-Jan Hartman <hartman@videolan.org>
git-committer:
Derk-Jan Hartman <hartman@videolan.org> 1134611040 +0000
git-parent:

[d91bba21e9d6763ed8dd8eb643b5116b3ba50c0b]

git-author:
Derk-Jan Hartman <hartman@videolan.org> 1134611040 +0000
Message:

* - This should fix the "crash upon quit" issue with VLC Mac OS X.

  • It should also no longer crash if you select macosx as an extraintf. This is not allowed. It is the cause of the NSDictionary crash reported often in the forums. Notice however that if you have selected a primary interface that is not macosx, you might end up with a "blank application" forcing you to reset the preferences manually (your fault for mocking with them in the first place).
  • Should fix clivlc mode. (this mode allows you to run VLC on OSX while no user is logged in, in the GUI).

Thanks to Jean-Michel Vallat for kicking my ass. :D

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/macosx/intf.m

    ra67fd4f r06ecc0b  
    807807- (void)manage 
    808808{ 
    809     NSDate * o_sleep_date; 
    810809    playlist_t * p_playlist; 
    811810 
     
    862861 
    863862        vlc_mutex_unlock( &p_intf->change_lock ); 
    864  
    865         o_sleep_date = [NSDate dateWithTimeIntervalSinceNow: .1]; 
    866         [NSThread sleepUntilDate: o_sleep_date]; 
    867     } 
    868  
    869     [self terminate]; 
     863        msleep( 100000 ); 
     864    } 
    870865    [o_pool release]; 
    871866} 
     
    14351430 
    14361431    p_intf->b_die = VLC_TRUE; 
    1437     [NSApp stop:NULL]; 
    14381432} 
    14391433 
  • src/interface/interface.c

    r29c81fb r06ecc0b  
    6767@interface VLCApplication : NSApplication 
    6868{ 
    69 
     69   vlc_t *o_vlc; 
     70
     71 
     72- (void)setVLC: (vlc_t *)p_vlc; 
    7073 
    7174@end 
     
    158161    } 
    159162 
    160     if( p_intf->b_block && strncmp( p_intf->p_module->psz_object_name, 
     163    if( p_intf->b_block && strncmp( p_intf->p_vlc->psz_object_name, 
    161164                                    "clivlc", 6) ) 
    162165    { 
    163166        o_pool = [[NSAutoreleasePool alloc] init]; 
    164167        [VLCApplication sharedApplication]; 
     168        [NSApp setVLC: p_intf->p_vlc]; 
    165169    } 
    166170 
     
    176180    { 
    177181        /* Run the interface in a separate thread */ 
     182        if( !strcmp( p_intf->p_module->psz_object_name, "macosx" ) ) 
     183        { 
     184            msg_Err( p_intf, "You cannot run the MacOS X module as an extrainterface. Please read the README.MacOSX.rtf file"); 
     185            return VLC_EGENERIC; 
     186        } 
    178187        if( vlc_thread_create( p_intf, "interface", RunInterface, 
    179188                               VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) ) 
     
    447456@implementation VLCApplication  
    448457 
     458- (void)setVLC: (vlc_t *) p_vlc 
     459{ 
     460    o_vlc = p_vlc; 
     461} 
     462 
    449463- (void)stop: (id)sender 
    450464{ 
     
    466480- (void)terminate: (id)sender 
    467481{ 
    468     if( [NSApp isRunning] ) 
    469         [NSApp stop:sender]; 
    470     [super terminate: sender]; 
     482    o_vlc->b_die = VLC_TRUE; 
    471483} 
    472484