Changeset 06ecc0b06606d780410b41770840c4eeb6032135
- 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
| ra67fd4f |
r06ecc0b |
|
| 807 | 807 | - (void)manage |
|---|
| 808 | 808 | { |
|---|
| 809 | | NSDate * o_sleep_date; |
|---|
| 810 | 809 | playlist_t * p_playlist; |
|---|
| 811 | 810 | |
|---|
| … | … | |
| 862 | 861 | |
|---|
| 863 | 862 | 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 | } |
|---|
| 870 | 865 | [o_pool release]; |
|---|
| 871 | 866 | } |
|---|
| … | … | |
| 1435 | 1430 | |
|---|
| 1436 | 1431 | p_intf->b_die = VLC_TRUE; |
|---|
| 1437 | | [NSApp stop:NULL]; |
|---|
| 1438 | 1432 | } |
|---|
| 1439 | 1433 | |
|---|
| r29c81fb |
r06ecc0b |
|
| 67 | 67 | @interface VLCApplication : NSApplication |
|---|
| 68 | 68 | { |
|---|
| 69 | | } |
|---|
| | 69 | vlc_t *o_vlc; |
|---|
| | 70 | } |
|---|
| | 71 | |
|---|
| | 72 | - (void)setVLC: (vlc_t *)p_vlc; |
|---|
| 70 | 73 | |
|---|
| 71 | 74 | @end |
|---|
| … | … | |
| 158 | 161 | } |
|---|
| 159 | 162 | |
|---|
| 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, |
|---|
| 161 | 164 | "clivlc", 6) ) |
|---|
| 162 | 165 | { |
|---|
| 163 | 166 | o_pool = [[NSAutoreleasePool alloc] init]; |
|---|
| 164 | 167 | [VLCApplication sharedApplication]; |
|---|
| | 168 | [NSApp setVLC: p_intf->p_vlc]; |
|---|
| 165 | 169 | } |
|---|
| 166 | 170 | |
|---|
| … | … | |
| 176 | 180 | { |
|---|
| 177 | 181 | /* 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 | } |
|---|
| 178 | 187 | if( vlc_thread_create( p_intf, "interface", RunInterface, |
|---|
| 179 | 188 | VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) ) |
|---|
| … | … | |
| 447 | 456 | @implementation VLCApplication |
|---|
| 448 | 457 | |
|---|
| | 458 | - (void)setVLC: (vlc_t *) p_vlc |
|---|
| | 459 | { |
|---|
| | 460 | o_vlc = p_vlc; |
|---|
| | 461 | } |
|---|
| | 462 | |
|---|
| 449 | 463 | - (void)stop: (id)sender |
|---|
| 450 | 464 | { |
|---|
| … | … | |
| 466 | 480 | - (void)terminate: (id)sender |
|---|
| 467 | 481 | { |
|---|
| 468 | | if( [NSApp isRunning] ) |
|---|
| 469 | | [NSApp stop:sender]; |
|---|
| 470 | | [super terminate: sender]; |
|---|
| | 482 | o_vlc->b_die = VLC_TRUE; |
|---|
| 471 | 483 | } |
|---|
| 472 | 484 | |
|---|