| 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 | ||
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.