]> git.sesse.net Git - vlc/blobdiff - src/misc/win32_specific.c
Src: change Windows Timer Precision, ref #264. Patch by atmo / Andre Weber.
[vlc] / src / misc / win32_specific.c
index dea9588d970cb0d2a49e7364dbcba4354f11710e..2fc5d2dcaba92235e63a0b8e6baa5fc1335bbdf4 100644 (file)
@@ -38,6 +38,7 @@
 #if !defined( UNDER_CE )
 #   include <io.h>
 #   include <fcntl.h>
+#   include  <mmsystem.h>
 #endif
 
 #include <winsock.h>
@@ -94,6 +95,8 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const 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 */
@@ -370,5 +373,9 @@ void system_End( libvlc_int_t *p_this )
         vlc_global()->psz_vlcpath = NULL;
     }
 
+#if !defined( UNDER_CE )
+    timeEndPeriod(5);
+#endif
+
     WSACleanup();
 }