File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ void OS_Windows::initialize() {
281281 QueryPerformanceFrequency ((LARGE_INTEGER *)&ticks_per_second);
282282 QueryPerformanceCounter ((LARGE_INTEGER *)&ticks_start);
283283
284+ #if WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
284285 // set minimum resolution for periodic timers, otherwise Sleep(n) may wait at least as
285286 // long as the windows scheduler resolution (~16-30ms) even for calls like Sleep(1)
286287 TIMECAPS time_caps;
@@ -292,6 +293,9 @@ void OS_Windows::initialize() {
292293 delay_resolution = 1000 ;
293294 timeBeginPeriod (1 );
294295 }
296+ #else
297+ delay_resolution = 1000 ;
298+ #endif
295299
296300 process_map = memnew ((HashMap<ProcessID, ProcessInfo>));
297301
@@ -374,7 +378,9 @@ void OS_Windows::finalize_core() {
374378
375379 FileAccessWindows::finalize ();
376380
381+ #if WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
377382 timeEndPeriod (1 );
383+ #endif
378384
379385 memdelete (process_map);
380386 NetSocketWinSock::cleanup ();
You can’t perform that action at this time.
0 commit comments