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
This commit is contained in:
briaguya 2025-01-27 17:59:46 -08:00 committed by GitHub
parent 41cf6b3338
commit 668e266ecc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<int16_t>((255 - titleContext->coverAlpha) / 5, 1);
}
}