Also replace the other thread sleep with play_delay_ms() and remove the #ifdef's.

This commit is contained in:
OBattler 2024-12-24 19:30:35 +01:00
parent 8db59e3c5c
commit 45124363a5

View file

@ -149,12 +149,8 @@ main_thread_fn()
if (dopause)
ack_pause();
#ifdef USE_THREAD_SLEEP
std::this_thread::sleep_for(std::chrono::milliseconds(1));
#else
timeBeginPeriod(1);
plat_delay_ms(1);
#endif
}
}
@ -162,7 +158,8 @@ main_thread_fn()
for (uint8_t i = 1; i < GFXCARD_MAX; i ++) {
if (gfxcard[i]) {
ui_deinit_monitor(i);
std::this_thread::sleep_for(std::chrono::milliseconds(500));
timeBeginPeriod(1);
plat_delay_ms(500);
}
}
QTimer::singleShot(0, QApplication::instance(), []() { QApplication::processEvents(); QApplication::instance()->quit(); });