mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
libobs/util: Cache windows CPU frequency
Caches the frequency of the performance counter. It was supposed to be caching it already, but it seems that code was unintentionally not included. Closes jp9000/obs-studio#1185
This commit is contained in:
parent
ef7a64228f
commit
18c1f10488
@ -37,8 +37,11 @@ static uint32_t winver = 0;
|
||||
|
||||
static inline uint64_t get_clockfreq(void)
|
||||
{
|
||||
if (!have_clockfreq)
|
||||
if (!have_clockfreq) {
|
||||
QueryPerformanceFrequency(&clock_freq);
|
||||
have_clockfreq = true;
|
||||
}
|
||||
|
||||
return clock_freq.QuadPart;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user