]> git.sesse.net Git - vlc/blobdiff - src/vlc.c
Mac OS X gui: Small code cleanup. Remove NSLogs, avoid code redundancy.
[vlc] / src / vlc.c
index 4d61b1ca03ca19c1d38551d137a6538d9bb3545c..7fe7bf7d268985b4bc174f54628bfe2e395fcccc 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -30,6 +30,7 @@
 #include <vlc/vlc.h>
 #include <stdio.h>                                              /* fprintf() */
 #include <stdlib.h>                                  /* putenv(), strtol(),  */
+#include <locale.h>
 
 
 /*****************************************************************************
@@ -57,6 +58,8 @@ int main( int i_argc, char *ppsz_argv[] )
 {
     int i_ret;
 
+    setlocale (LC_ALL, "");
+
 #ifndef __APPLE__
     /* This clutters OSX GUI error logs */
     fprintf( stderr, "VLC media player %s\n", VLC_Version() );
@@ -145,7 +148,7 @@ int main( int i_argc, char *ppsz_argv[] )
                 }
                 else
                 {
-                    ppsz_argv[i] = "";
+                    ppsz_argv[i] = strdup ("");
                 }
             }
             else
@@ -202,6 +205,11 @@ static void *SigHandler (void *data)
     time_t abort_time = 0;
     vlc_bool_t b_die = VLC_FALSE;
 
+#ifdef __APPLE__
+    /* We really prefer the "force quit" menu item to act immediately */
+    b_die = VLC_TRUE;
+#endif
+
     for (;;)
     {
         int i_signal, state;