Commit f49468a2 authored by Gildas Bazin's avatar Gildas Bazin

* src/libvlc.c, include/vlc_interface.h: don't open a win32 console when using a cygwin shell.

parent b7ee5eb7
...@@ -118,10 +118,13 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) ); ...@@ -118,10 +118,13 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_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 */ \
{ \
AllocConsole(); \ AllocConsole(); \
freopen( "CONOUT$", "w", stdout ); \ freopen( "CONOUT$", "w", stdout ); \
freopen( "CONOUT$", "w", stderr ); \ freopen( "CONOUT$", "w", stderr ); \
freopen( "CONIN$", "r", stdin ); \ freopen( "CONIN$", "r", stdin ); \
} \
msg_Info( p_intf, COPYRIGHT_MESSAGE ); \ msg_Info( p_intf, COPYRIGHT_MESSAGE ); \
msg_Info( p_intf, _("\nWarning: if you can't access the GUI " \ msg_Info( p_intf, _("\nWarning: if you can't access the GUI " \
"anymore, open a dos command box, go to the " \ "anymore, open a dos command box, go to the " \
......
...@@ -2168,11 +2168,15 @@ static void Version( void ) ...@@ -2168,11 +2168,15 @@ static void Version( void )
static void ShowConsole( void ) static void ShowConsole( void )
{ {
# ifndef UNDER_CE # ifndef UNDER_CE
if( getenv( "PWD" ) && getenv( "PS1" ) ) return; /* cygwin shell */
AllocConsole(); AllocConsole();
freopen( "CONOUT$", "w", stdout ); freopen( "CONOUT$", "w", stdout );
freopen( "CONOUT$", "w", stderr ); freopen( "CONOUT$", "w", stderr );
freopen( "CONIN$", "r", stdin ); freopen( "CONIN$", "r", stdin );
# endif # endif
return; return;
} }
#endif #endif
......
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