[vlc-commits] OSX GUI: move single termination variable where it's used
Rafaël Carré
git at videolan.org
Thu Feb 16 01:02:56 CET 2012
vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Wed Feb 15 14:42:25 2012 -0500| [20651de0810e34115709da70219380143aa3e3c6] | committer: Felix Paul Kühne
OSX GUI: move single termination variable where it's used
Use boolean for those variables
(cherry picked from commit 220a9ee46edcfa8565ad35d4c128ecfaabba9ff1)
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=20651de0810e34115709da70219380143aa3e3c6
---
modules/gui/macosx/intf.m | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 77f21c6..3a0e11c 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -188,7 +188,6 @@ void WindowClose( vout_window_t *p_wnd )
* Run: main loop
*****************************************************************************/
static NSLock * o_appLock = nil; // controls access to f_appExit
-static int f_appExit = 0; // set to 1 when application termination signaled
static void Run( intf_thread_t *p_intf )
{
@@ -683,10 +682,12 @@ static VLCMain *_o_sharedMainInstance = nil;
/* don't allow a double termination call. If the user has
* already invoked the quit then simply return this time. */
- int isTerminating = false;
+ static bool f_appExit = false;
+ bool isTerminating;
[o_appLock lock];
- isTerminating = (f_appExit++ > 0 ? 1 : 0);
+ isTerminating = f_appExit;
+ f_appExit = true;
[o_appLock unlock];
if (isTerminating)
More information about the vlc-commits
mailing list