Frontend: Fix thread starvation caused by spamming the Vulkan mutex

This commit is contained in:
Tony Wasserka 2025-01-05 12:07:15 +01:00
parent c06c249eeb
commit 661a72c8f6

View file

@ -690,6 +690,9 @@ if (bootstrap_nand) // Experimental system bootstrapper
continue; continue;
} }
// Limit to ~60 FPS. This avoids starving the emulation thread when locking g_vulkan_queue_mutex
std::this_thread::sleep_for(std::chrono::milliseconds { 15 });
// Process next frame from the emulation core, if any (and do so three times for each screen id... TODO: Find a nicer way of doing this) // Process next frame from the emulation core, if any (and do so three times for each screen id... TODO: Find a nicer way of doing this)
display->BeginFrame(); display->BeginFrame();