aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVoyager-xbmc <patrick.middag@telenet.be>2012-09-02 11:19:27 +0200
committerVoyager-xbmc <patrick.middag@telenet.be>2012-09-02 11:19:27 +0200
commiteb23eb5902c92956010b2aee95a152f6f77cdd60 (patch)
tree84a5263faa9a7d246843762965d8ec13b662a1e7
parentc1950f5b068386e1185e2702b9c463c4088b47f4 (diff)
post-SDL removal fix: use 1 ms timer precision
-rw-r--r--xbmc/win32/XBMC_PC.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/xbmc/win32/XBMC_PC.cpp b/xbmc/win32/XBMC_PC.cpp
index 2cf9f4b72a..c11a0c1815 100644
--- a/xbmc/win32/XBMC_PC.cpp
+++ b/xbmc/win32/XBMC_PC.cpp
@@ -185,6 +185,9 @@ INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR commandLine, INT )
WSADATA wd;
WSAStartup(MAKEWORD(2,2), &wd);
+ // use 1 ms timer precision - like SDL initialization used to do
+ timeBeginPeriod(1);
+
// Create and run the app
if(!g_application.Create())
{
@@ -217,6 +220,9 @@ INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR commandLine, INT )
g_application.Run(true);
+ // clear previously set timer resolution
+ timeEndPeriod(1);
+
// the end
WSACleanup();
CoUninitialize();