1
mirror of https://code.videolan.org/videolan/vlc synced 2024-08-31 06:46:39 +02:00

Do not create a console under Wine

Not only is an extra console obnoxious, but freopen() crashes.
This commit is contained in:
Rémi Denis-Courmont 2011-07-28 22:59:20 +03:00
parent e8baa84680
commit f44e0d5980
2 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ VLC_API void libvlc_Quit( libvlc_int_t * );
*****************************************************************************/
#if defined( WIN32 ) && !defined( UNDER_CE )
# define CONSOLE_INTRO_MSG \
if( !getenv( "PWD" ) || !getenv( "PS1" ) ) /* detect cygwin shell */ \
if( !getenv( "PWD" ) ) /* detect Cygwin shell or Wine */ \
{ \
AllocConsole(); \
freopen( "CONOUT$", "w", stdout ); \
@ -128,7 +128,7 @@ VLC_API void libvlc_Quit( libvlc_int_t * );
"directory where you installed VLC and run " \
"\"vlc -I qt\"\n") )
#else
# define CONSOLE_INTRO_MSG
# define CONSOLE_INTRO_MSG (void)0
#endif
/* Interface dialog ids for dialog providers */

View File

@ -1894,7 +1894,7 @@ static void ShowConsole( bool b_dofile )
# ifndef UNDER_CE
FILE *f_help = NULL;
if( getenv( "PWD" ) && getenv( "PS1" ) ) return; /* cygwin shell */
if( getenv( "PWD" ) ) return; /* Cygwin shell or Wine */
AllocConsole();
/* Use the ANSI code page (e.g. Windows-1252) as expected by the LibVLC
@ -1928,7 +1928,7 @@ static void PauseConsole( void )
{
# 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") );
getchar();