Skip to content

Commit

Permalink
Merge pull request #1352 from Voyager-xbmc/timerprecision-fix
Browse files Browse the repository at this point in the history
Set system timer precision back to 1ms - post getting rid of SDL fix
  • Loading branch information
wsoltys committed Sep 2, 2012
2 parents 42dde07 + eb23eb5 commit 2a3f091
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xbmc/win32/XBMC_PC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 2a3f091

Please sign in to comment.