Changeset 36ca011c05a6d034c37ee881519daa78e5e89c39
- Timestamp:
- 24/07/08 21:00:26
(4 months ago)
- Author:
- Rémi Denis-Courmont <rdenis@simphalempin.com>
- git-committer:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1216926026 +0300
- git-parent:
[4794bb1e1b0c9fec3cbf24b84421a67e081b680f]
- git-author:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1216926026 +0300
- Message:
Remove the main thread hack on platforms with non-idiotic toolkits
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r420ab47 |
r36ca011 |
|
| 51 | 51 | |
|---|
| 52 | 52 | /* Thread properties and locks */ |
|---|
| | 53 | #ifdef __APPLE__ |
|---|
| 53 | 54 | bool b_should_run_on_first_thread; |
|---|
| | 55 | #endif |
|---|
| 54 | 56 | |
|---|
| 55 | 57 | /* Specific interfaces */ |
|---|
| r4d654a4 |
r36ca011 |
|
| 51 | 51 | *****************************************************************************/ |
|---|
| 52 | 52 | static void RunInterface( intf_thread_t *p_intf ); |
|---|
| | 53 | #ifdef __APPLE__ |
|---|
| 53 | 54 | static void MonitorLibVLCDeath( intf_thread_t *p_intf ); |
|---|
| 54 | | |
|---|
| | 55 | #endif |
|---|
| 55 | 56 | static int AddIntfCallback( vlc_object_t *, char const *, |
|---|
| 56 | 57 | vlc_value_t , vlc_value_t , void * ); |
|---|
| … | … | |
| 96 | 97 | return NULL; |
|---|
| 97 | 98 | p_intf->b_interaction = false; |
|---|
| | 99 | #ifdef __APPLE__ |
|---|
| 98 | 100 | p_intf->b_should_run_on_first_thread = false; |
|---|
| | 101 | #endif |
|---|
| 99 | 102 | |
|---|
| 100 | 103 | /* Choose the best module */ |
|---|
| … | … | |
| 137 | 140 | int intf_RunThread( intf_thread_t *p_intf ) |
|---|
| 138 | 141 | { |
|---|
| | 142 | #ifdef __APPLE__ |
|---|
| 139 | 143 | /* Hack to get Mac OS X Cocoa runtime running |
|---|
| 140 | 144 | * (it needs access to the main thread) */ |
|---|
| … | … | |
| 159 | 163 | return VLC_SUCCESS; |
|---|
| 160 | 164 | } |
|---|
| 161 | | |
|---|
| | 165 | #endif |
|---|
| 162 | 166 | /* Run the interface in a separate thread */ |
|---|
| 163 | 167 | if( vlc_thread_create( p_intf, "interface", RunInterface, |
|---|
| … | … | |
| 255 | 259 | } |
|---|
| 256 | 260 | |
|---|
| | 261 | #ifdef __APPLE__ |
|---|
| 257 | 262 | /***************************************************************************** |
|---|
| 258 | 263 | * MonitorLibVLCDeath: Used when b_should_run_on_first_thread is set. |
|---|
| … | … | |
| 284 | 289 | } |
|---|
| 285 | 290 | vlc_list_release( p_list ); |
|---|
| 286 | | |
|---|
| 287 | | } |
|---|
| | 291 | } |
|---|
| | 292 | #endif |
|---|
| 288 | 293 | |
|---|
| 289 | 294 | static int AddIntfCallback( vlc_object_t *p_this, char const *psz_cmd, |
|---|