From 668e266ecc867f38db39b4cce833a299f21a60c9 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:59:46 -0800 Subject: [PATCH] clamp `addAlpha` when skipping spinning logos to prevent softlock (#4964) * debug print logos seen * maybe this is the fix, not sure if there's a better option i'm overlooking * use clamp * msvc plz * msvc? * max is cleaner --- soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp b/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp index 48bbdb6b6..d478f8fc3 100644 --- a/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp +++ b/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp @@ -185,7 +185,7 @@ void OnZTitleUpdatePressButtonToSkip(void* gameState) { if (CHECK_BTN_ANY(titleContext->state.input->press.button, BTN_A | BTN_B | BTN_START)) { // Force the title state to start fading to black and to last roughly 5 frames based on current fade in/out titleContext->visibleDuration = 0; - titleContext->addAlpha = (255 - titleContext->coverAlpha) / 5; + titleContext->addAlpha = std::max((255 - titleContext->coverAlpha) / 5, 1); } }