#include "config/configuration.h"
#include "libvlc.h"
-#if defined( WIN32 )
+#if defined( _WIN32 ) && !VLC_WINSTORE_APP
static void ShowConsole (void);
static void PauseConsole (void);
#else
#define LINE_START 8
#define PADDING_SPACES 25
-#ifdef WIN32
+#ifdef _WIN32
# define OPTION_VALUE_SEP "="
#else
# define OPTION_VALUE_SEP " "
psz_spaces_text[PADDING_SPACES+LINE_START] = '\0';
memset( psz_spaces_longtext, ' ', LINE_START+2 );
psz_spaces_longtext[LINE_START+2] = '\0';
-#ifndef WIN32
+#ifndef _WIN32
if( !isatty( 1 ) )
#endif
b_color = false; // don't put color control codes in a .txt file
bool b_color = var_InheritBool( p_this, "color" );
ShowConsole();
-#ifdef WIN32
+#ifdef _WIN32
b_color = false; // don't put color control codes in a .txt file
#else
if( !isatty( 1 ) )
PauseConsole();
}
-#if defined (WIN32)
+#if defined( _WIN32 ) && !VLC_WINSTORE_APP
/*****************************************************************************
* ShowConsole: On Win32, create an output console for debug messages
*****************************************************************************
if( getenv( "PWD" ) ) return; /* Cygwin shell or Wine */
- AllocConsole();
+ if( !AllocConsole() ) return;
+
/* Use the ANSI code page (e.g. Windows-1252) as expected by the LibVLC
* Unicode/locale subsystem. By default, we have the obsolecent OEM code
* page (e.g. CP437 or CP850). */
SetConsoleOutputCP (GetACP ());
- SetConsoleTitle ("VLC media player version "PACKAGE_VERSION);
+ SetConsoleTitle (TEXT("VLC media player version "PACKAGE_VERSION));
freopen( "CONOUT$", "w", stderr );
freopen( "CONIN$", "r", stdin );
{
unsigned i_width = 80;
-#ifndef WIN32
+#ifndef _WIN32
FILE *file = popen( "stty size 2>/dev/null", "r" );
if (file != NULL)
{
i_width = 80;
pclose( file );
}
-#else
+#elif !VLC_WINSTORE_APP
CONSOLE_SCREEN_BUFFER_INFO buf;
if (GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &buf))