impr: Added more generic way to unlock frame rate when needed

This commit is contained in:
WerWolv
2025-07-27 16:25:10 +02:00
parent c7b2f26bd5
commit f42ae97f14
6 changed files with 28 additions and 2 deletions

View File

@@ -355,8 +355,10 @@ namespace hex {
if (ImGui::GetPlatformIO().Viewports.size() > 1)
unlockFrameRate();
// Unlock frame rate if there's any task running that shows a loading animation
if (TaskManager::getRunningTaskCount() > 0 || TaskManager::getRunningBlockingTaskCount() > 0) {
// Unlock frame rate if the frame rate was requested to be unlocked
if (ImHexApi::System::impl::frameRateUnlockRequested()) {
ImHexApi::System::impl::resetFrameRateUnlockRequested();
glfwPostEmptyEvent();
unlockFrameRate();
}