impr: Better font loading logic

This commit is contained in:
WerWolv
2024-06-16 22:41:16 +02:00
parent deee76e455
commit f49715c7a0
8 changed files with 351 additions and 264 deletions

View File

@@ -270,7 +270,6 @@ namespace hex {
glfwWaitEventsTimeout(targetFrameTime - frameTime);
// glfwWaitEventsTimeout might return early if there's an event
const auto frameTime = glfwGetTime() - m_lastStartFrameTime;
if (frameTime < targetFrameTime) {
const auto timeToSleepMs = (int)((targetFrameTime - frameTime) * 1000);
std::this_thread::sleep_for(std::chrono::milliseconds(timeToSleepMs));