]> git.sesse.net Git - vlc/commitdiff
* on win32 the rc plugin opens a new console.
authorGildas Bazin <gbazin@videolan.org>
Sun, 19 May 2002 15:23:35 +0000 (15:23 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 19 May 2002 15:23:35 +0000 (15:23 +0000)
plugins/dummy/intf_dummy.c
plugins/text/rc.c

index 99b557330ab3600c309941acc8e6173b9bf80de6..19eff6a84f54afe0e93f1709370a03c73d5bcfba 100644 (file)
@@ -2,7 +2,7 @@
  * intf_dummy.c: dummy interface plugin
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: intf_dummy.c,v 1.16 2002/05/19 10:06:37 gbazin Exp $
+ * $Id: intf_dummy.c,v 1.17 2002/05/19 15:23:35 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -71,6 +71,15 @@ static int intf_Open( intf_thread_t *p_intf )
         return( 1 );
     };
 
+#ifdef WIN32
+    AllocConsole();
+    freopen( "CONOUT$", "w", stdout );
+    freopen( "CONOUT$", "w", stderr );
+    freopen( "CONIN$", "r", stdin );
+    intf_Msg( VERSION_MESSAGE );
+    intf_Msg( _("\nUsing the dummy interface plugin...") );
+#endif
+
     return( 0 );
 }
 
@@ -89,15 +98,6 @@ static void intf_Close( intf_thread_t *p_intf )
  *****************************************************************************/
 static void intf_Run( intf_thread_t *p_intf )
 {
-#ifdef WIN32
-    AllocConsole();
-    freopen( "CONOUT$", "w", stdout );
-    freopen( "CONOUT$", "w", stderr );
-    freopen( "CONIN$", "r", stdin );
-    intf_Msg( VERSION_MESSAGE );
-    intf_Msg( _("\nUsing the dummy interface plugin...") );
-#endif
-
     while( !p_intf->b_die )
     {
         /* Manage core vlc functions through the callback */
index 8167ea7443c7b5f0276e53553e6bd7666509aab4..3be278adb18df10674fe06c67bffb9dada993469 100644 (file)
@@ -2,7 +2,7 @@
  * rc.c : remote control stdin/stdout plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: rc.c,v 1.13 2002/05/18 07:30:03 sam Exp $
+ * $Id: rc.c,v 1.14 2002/05/19 15:23:35 gbazin Exp $
  *
  * Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
  *
@@ -120,6 +120,14 @@ static int intf_Open( intf_thread_t *p_intf )
         return( 1 );
     }
 
+#ifdef WIN32
+    AllocConsole();
+    freopen( "CONOUT$", "w", stdout );
+    freopen( "CONOUT$", "w", stderr );
+    freopen( "CONIN$", "r", stdin );
+    intf_Msg( VERSION_MESSAGE );
+#endif
+
     intf_Msg( "rc: remote control interface initialized, `h' for help" );
     return( 0 );
 }