From e7cc5a858ee1531a73b5bb22830c691ecf8b8374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo?= Date: Thu, 6 Feb 2025 18:38:18 -0300 Subject: [PATCH] Change progress bar animation on installer. (#299) --- UnleashedRecomp/ui/installer_wizard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UnleashedRecomp/ui/installer_wizard.cpp b/UnleashedRecomp/ui/installer_wizard.cpp index 55295ea..4d4c0f8 100644 --- a/UnleashedRecomp/ui/installer_wizard.cpp +++ b/UnleashedRecomp/ui/installer_wizard.cpp @@ -1275,8 +1275,9 @@ static void DrawInstallingProgress() { if (g_currentPage == WizardPage::Installing) { + constexpr float ProgressSpeed = 0.1f; float ratioTarget = g_installerProgressRatioTarget.load(); - g_installerProgressRatioCurrent += (4.0f * ImGui::GetIO().DeltaTime * (ratioTarget - g_installerProgressRatioCurrent)); + g_installerProgressRatioCurrent += std::min(ratioTarget - g_installerProgressRatioCurrent, ProgressSpeed * ImGui::GetIO().DeltaTime); DrawProgressBar(g_installerProgressRatioCurrent); if (g_installerFinished)