mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Try to avoid direct initialization
This commit is contained in:
parent
944eb01fb4
commit
e259a8c63b
@ -441,8 +441,9 @@ static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds
|
||||
struct QueueEntry **ptr;
|
||||
|
||||
#if _WIN32_WINNT >= 0x0500
|
||||
static LARGE_INTEGER performanceCounterFrequency = { .QuadPart = 0 };
|
||||
static LARGE_INTEGER performanceCounterFrequency;
|
||||
LARGE_INTEGER tsBegin;
|
||||
static bool first_init = true;
|
||||
#else
|
||||
static bool beginPeriod = false;
|
||||
DWORD tsBegin;
|
||||
@ -460,6 +461,12 @@ static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds
|
||||
/* since this library is meant for realtime game software
|
||||
* I have no problem setting this to 1 and forgetting about it. */
|
||||
#if _WIN32_WINNT >= 0x0500
|
||||
if (first_init)
|
||||
{
|
||||
performanceCounterFrequency.QuadPart = 0;
|
||||
first_init = false;
|
||||
}
|
||||
|
||||
if (performanceCounterFrequency.QuadPart == 0)
|
||||
{
|
||||
QueryPerformanceFrequency(&performanceCounterFrequency);
|
||||
|
Loading…
x
Reference in New Issue
Block a user