We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5104

Summary: Timer resolution should not be set to 1ms on default.
Product: SDL Reporter: Joel Linn <jl>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: rick
Version: 2.0.12   
Hardware: x86_64   
OS: Windows 10   

Description Joel Linn 2020-04-22 22:16:03 UTC
SDL_Init() initializes Ticks which sets the windows timer resolution to 1ms at default. timeBeginPeriod() is used for this. We call NtSetTimerResolution() before to set the resolution to a lower value and SDL overwrites this at default, which costs us decreased frame-rates. This behaviour can be turned off setting a Hint before calling SDL_Init() of course.

However, in SDL_hints.h it is elaborated that setting the timer resolution is a bad idea in many cases as well as:
> This hint is only used on Windows 7 and earlier.
From that I deduce timeBeginPreiod() should never be called on Windows 8 upwards, hence a bug report.