Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
f46398cf
Commit
f46398cf
authored
Feb 23, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/gui/macosx.m: Make sure the module will terminate after a Ctrl-C from a term.
parent
260a1836
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+25
-0
No files found.
modules/gui/macosx/intf.m
View file @
f46398cf
...
...
@@ -124,6 +124,27 @@ void E_(CloseIntf) ( vlc_object_t *p_this )
free
(
p_intf
->
p_sys
);
}
/*****************************************************************************
* KillerThread: Thread that kill the application
*****************************************************************************/
static
void
*
KillerThread
(
void
*
user_data
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
intf_thread_t
*
p_intf
=
user_data
;
vlc_object_lock
(
p_intf
);
while
(
vlc_object_alive
(
p_intf
)
)
vlc_object_wait
(
p_intf
);
vlc_object_unlock
(
p_intf
);
msg_Dbg
(
p_intf
,
"Killing the Mac OS X module
\n
"
);
/* We are dead, terminate */
[
NSApp
terminate
:
nil
];
[
o_pool
release
];
return
NULL
;
}
/*****************************************************************************
* Run: main loop
*****************************************************************************/
...
...
@@ -157,6 +178,10 @@ static void Run( intf_thread_t *p_intf )
[[
VLCMain
sharedInstance
]
setIntf
:
p_intf
];
[
NSBundle
loadNibNamed
:
@"MainMenu"
owner
:
NSApp
];
/* Setup a thread that will monitor the module killing */
pthread_t
killer_thread
;
pthread_create
(
&
killer_thread
,
NULL
,
KillerThread
,
p_intf
);
/* Install a jmpbuffer to where we can go back before the NSApp exit
* see applicationWillTerminate: */
if
(
setjmp
(
jmpbuffer
)
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment