]> git.sesse.net Git - vlc/commitdiff
Should fix vlc-help.txt problem (untested) (Refs:#517)
authorClément Stenac <zorglub@videolan.org>
Sat, 11 Feb 2006 16:10:43 +0000 (16:10 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 11 Feb 2006 16:10:43 +0000 (16:10 +0000)
src/libvlc.c

index 42cda6d8d0411e08cea01b568ecf975b37ae39a6..ad475f6e456c0b7fc4ebdfce6670f3b452fb2609 100644 (file)
@@ -112,7 +112,7 @@ static void ListModules   ( vlc_t * );
 static void Version       ( void );
 
 #ifdef WIN32
-static void ShowConsole   ( void );
+static void ShowConsole   ( vlc_bool_t );
 static void PauseConsole  ( void );
 #endif
 static int  ConsoleWidth  ( void );
@@ -587,7 +587,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
     if( config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_FALSE ) )
     {
 #ifdef WIN32
-        ShowConsole();
+        ShowConsole( VLC_FALSE );
         /* Pause the console because it's destroyed when we exit */
         fprintf( stderr, "The command line options couldn't be loaded, check "
                  "that they are valid.\n" );
@@ -2119,7 +2119,7 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
 static void Help( vlc_t *p_this, char const *psz_help_name )
 {
 #ifdef WIN32
-    ShowConsole();
+    ShowConsole( VLC_TRUE );
 #endif
 
     if( psz_help_name && !strcmp( psz_help_name, "help" ) )
@@ -2442,7 +2442,7 @@ static void ListModules( vlc_t *p_this )
     memset( psz_spaces, ' ', 22 );
 
 #ifdef WIN32
-    ShowConsole();
+    ShowConsole( VLC_TRUE );
 #endif
 
     /* List all modules */
@@ -2482,7 +2482,7 @@ static void ListModules( vlc_t *p_this )
 static void Version( void )
 {
 #ifdef WIN32
-    ShowConsole();
+    ShowConsole( VLC_TRUE );
 #endif
 
     fprintf( stdout, _("VLC version %s\n"), VLC_Version() );
@@ -2505,7 +2505,7 @@ static void Version( void )
  * This function is useful only on Win32.
  *****************************************************************************/
 #ifdef WIN32 /*  */
-static void ShowConsole( void )
+static void ShowConsole( vlc_bool_t b_dofile )
 {
 #   ifndef UNDER_CE
     FILE *f_help;
@@ -2517,7 +2517,7 @@ static void ShowConsole( void )
     freopen( "CONOUT$", "w", stderr );
     freopen( "CONIN$", "r", stdin );
 
-    if( (f_help = fopen( "vlc-help.txt", "wt" )) )
+    if( b_dofile && (f_help = fopen( "vlc-help.txt", "wt" )) )
     {
         fclose( f_help );
         freopen( "vlc-help.txt", "wt", stdout );