[vlc-commits] Win32: disable Console output of help in WSA mode

Jean-Baptiste Kempf git at videolan.org
Tue Jan 22 13:45:21 CET 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jan 22 11:33:12 2013 +0100| [82a8a42a5ef53e0a1990dc7c8b12b0660a8f76f7] | committer: Jean-Baptiste Kempf

Win32: disable Console output of help in WSA mode

Calling AllocConsole does not work all the time in Metro mode,
and is supposed to be an undefined behaviour.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=82a8a42a5ef53e0a1990dc7c8b12b0660a8f76f7
---

 src/config/help.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/config/help.c b/src/config/help.c
index bc9dd82..15a5153 100644
--- a/src/config/help.c
+++ b/src/config/help.c
@@ -34,7 +34,7 @@
 #include "config/configuration.h"
 #include "libvlc.h"
 
-#if defined( WIN32 )
+#if defined( WIN32 ) && !defined(WINAPI_FAMILY_APP)
 static void ShowConsole (void);
 static void PauseConsole (void);
 #else
@@ -796,7 +796,7 @@ static void Version( void )
     PauseConsole();
 }
 
-#if defined (WIN32)
+#if defined( WIN32 ) && !defined(WINAPI_FAMILY_APP)
 /*****************************************************************************
  * ShowConsole: On Win32, create an output console for debug messages
  *****************************************************************************
@@ -861,7 +861,7 @@ static int ConsoleWidth( void )
             i_width = 80;
         pclose( file );
     }
-#else
+#elif !defined(WINAPI_FAMILY_APP)
     CONSOLE_SCREEN_BUFFER_INFO buf;
 
     if (GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &buf))



More information about the vlc-commits mailing list