Add thread yielding to qt main_thread that was omited.

This commit is contained in:
ts-korhonen
2021-12-13 18:02:22 +02:00
parent c5261da4f3
commit f2d79eee59

View File

@@ -71,8 +71,13 @@ main_thread_fn()
nvr_dosave = 0;
frames = 0;
}
} else /* Just so we dont overload the host OS. */
std::this_thread::sleep_for(std::chrono::milliseconds(1));
} else {
/* Just so we dont overload the host OS. */
if (drawits < -1)
std::this_thread::sleep_for(std::chrono::milliseconds(1));
else
std::this_thread::yield();
}
/* If needed, handle a screen resize. */
if (doresize && !video_fullscreen && !is_quit) {