Skip to content

Commit

Permalink
clamp addAlpha when skipping spinning logos to prevent softlock (Ha…
Browse files Browse the repository at this point in the history
…rbourMasters#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
  • Loading branch information
briaguya-ai authored Jan 28, 2025
1 parent 41cf6b3 commit 668e266
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 668e266

Please sign in to comment.