]> git.sesse.net Git - vlc/blobdiff - src/misc/win32_specific.c
Fix a little bug in the playlist sorting.
[vlc] / src / misc / win32_specific.c
index 881f82118ea24426b28abf4891b149e7188cf7ec..2fc5d2dcaba92235e63a0b8e6baa5fc1335bbdf4 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 #include "../libvlc.h"
 #include <vlc_playlist.h>
@@ -34,6 +38,7 @@
 #if !defined( UNDER_CE )
 #   include <io.h>
 #   include <fcntl.h>
+#   include  <mmsystem.h>
 #endif
 
 #include <winsock.h>
@@ -41,7 +46,7 @@
 /*****************************************************************************
  * system_Init: initialize winsock and misc other things.
  *****************************************************************************/
-void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
 {
     WSADATA Data;
 
@@ -90,6 +95,8 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
 #if !defined( UNDER_CE )
     _fmode = _O_BINARY;
     _setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
+
+    timeBeginPeriod(5);
 #endif
 
     /* Call mdate() once to make sure it is initialized properly */
@@ -135,7 +142,7 @@ typedef struct
   char data[0];
 } vlc_ipc_data_t;
 
-void system_Configure( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
 {
 #if !defined( UNDER_CE )
     /* Raise default priority of the current process */
@@ -366,5 +373,9 @@ void system_End( libvlc_int_t *p_this )
         vlc_global()->psz_vlcpath = NULL;
     }
 
+#if !defined( UNDER_CE )
+    timeEndPeriod(5);
+#endif
+
     WSACleanup();
 }