Commit f44e0d59 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Do not create a console under Wine

Not only is an extra console obnoxious, but freopen() crashes.
parent e8baa846
...@@ -114,7 +114,7 @@ VLC_API void libvlc_Quit( libvlc_int_t * ); ...@@ -114,7 +114,7 @@ VLC_API void libvlc_Quit( libvlc_int_t * );
*****************************************************************************/ *****************************************************************************/
#if defined( WIN32 ) && !defined( UNDER_CE ) #if defined( WIN32 ) && !defined( UNDER_CE )
# define CONSOLE_INTRO_MSG \ # define CONSOLE_INTRO_MSG \
if( !getenv( "PWD" ) || !getenv( "PS1" ) ) /* detect cygwin shell */ \ if( !getenv( "PWD" ) ) /* detect Cygwin shell or Wine */ \
{ \ { \
AllocConsole(); \ AllocConsole(); \
freopen( "CONOUT$", "w", stdout ); \ freopen( "CONOUT$", "w", stdout ); \
...@@ -128,7 +128,7 @@ VLC_API void libvlc_Quit( libvlc_int_t * ); ...@@ -128,7 +128,7 @@ VLC_API void libvlc_Quit( libvlc_int_t * );
"directory where you installed VLC and run " \ "directory where you installed VLC and run " \
"\"vlc -I qt\"\n") ) "\"vlc -I qt\"\n") )
#else #else
# define CONSOLE_INTRO_MSG # define CONSOLE_INTRO_MSG (void)0
#endif #endif
/* Interface dialog ids for dialog providers */ /* Interface dialog ids for dialog providers */
......
...@@ -1894,7 +1894,7 @@ static void ShowConsole( bool b_dofile ) ...@@ -1894,7 +1894,7 @@ static void ShowConsole( bool b_dofile )
# ifndef UNDER_CE # ifndef UNDER_CE
FILE *f_help = NULL; FILE *f_help = NULL;
if( getenv( "PWD" ) && getenv( "PS1" ) ) return; /* cygwin shell */ if( getenv( "PWD" ) ) return; /* Cygwin shell or Wine */
AllocConsole(); AllocConsole();
/* Use the ANSI code page (e.g. Windows-1252) as expected by the LibVLC /* Use the ANSI code page (e.g. Windows-1252) as expected by the LibVLC
...@@ -1928,7 +1928,7 @@ static void PauseConsole( void ) ...@@ -1928,7 +1928,7 @@ static void PauseConsole( void )
{ {
# ifndef UNDER_CE # ifndef UNDER_CE
if( getenv( "PWD" ) && getenv( "PS1" ) ) return; /* cygwin shell */ if( getenv( "PWD" ) ) return; /* Cygwin shell or Wine */
utf8_fprintf( stderr, _("\nPress the RETURN key to continue...\n") ); utf8_fprintf( stderr, _("\nPress the RETURN key to continue...\n") );
getchar(); getchar();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment