mirror of
https://github.com/86Box/86Box.git
synced 2025-01-22 17:22:25 -05:00
Changed to plat_delay_ms() according to tneukom's latest suggestion.
This commit is contained in:
parent
59baaaf5a6
commit
cb957fe517
2 changed files with 8 additions and 6 deletions
|
@ -149,9 +149,6 @@ main_thread_fn()
|
|||
if (dopause)
|
||||
ack_pause();
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
timeBeginPeriod(1);
|
||||
#endif
|
||||
plat_delay_ms(1);
|
||||
}
|
||||
}
|
||||
|
@ -160,9 +157,6 @@ main_thread_fn()
|
|||
for (uint8_t i = 1; i < GFXCARD_MAX; i ++) {
|
||||
if (gfxcard[i]) {
|
||||
ui_deinit_monitor(i);
|
||||
#ifdef Q_OS_WINDOWS
|
||||
timeBeginPeriod(1);
|
||||
#endif
|
||||
plat_delay_ms(500);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,15 @@ extern "C" {
|
|||
void
|
||||
plat_delay_ms(uint32_t count)
|
||||
{
|
||||
#ifdef Q_OS_WINDOWS
|
||||
// On Win32 the accuracy of Sleep() depends on the timer resolution, which can be set by calling timeBeginPeriod
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod
|
||||
timeBeginPeriod(1);
|
||||
Sleep(count);
|
||||
timeEndPeriod(1);
|
||||
#else
|
||||
QThread::msleep(count);
|
||||
#endif
|
||||
}
|
||||
|
||||
wchar_t *
|
||||
|
|
Loading…
Reference in a new issue