Skip to content

Commit

Permalink
Common: Fix FFNx Logo when enable_lighting is enabled
Browse files Browse the repository at this point in the history
Fixes #573
  • Loading branch information
julianxhokaxhiu committed Oct 8, 2023
1 parent a07df2a commit 70b3d4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## Common

- Logo: Fix intro logo showing up when `enable_lighting = true`
- Movie: Fix audio stream playing at the same time as the external audio
- Movie: Add support for the AV1 codec

Expand Down
7 changes: 7 additions & 0 deletions src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3353,8 +3353,13 @@ int ffnx_logo_current_frame = 0;

bool drawFFNxLogoFrame(struct game_obj* game_object)
{
static int was_lighting_enabled = -1;

if (was_lighting_enabled == -1) was_lighting_enabled = enable_lighting;

if (ffnx_logo_current_frame >= FFNX_LOGO_FRAME_COUNT) {
newRenderer.setOverallColorGamut(enable_ntscj_gamut_mode ? COLORGAMUT_NTSCJ : COLORGAMUT_SRGB); // set the gamut back to what it was before newRenderer.drawFFNxLogo() changed it
enable_lighting = was_lighting_enabled;
return false;
}

Expand All @@ -3370,6 +3375,8 @@ bool drawFFNxLogoFrame(struct game_obj* game_object)
else
fade = 1.0f - (ffnx_logo_current_frame - 2 * fade_frame_count) / static_cast<float>(fade_frame_count);

enable_lighting = false;

newRenderer.drawFFNxLogo(fade);

common_flip(game_object);
Expand Down

0 comments on commit 70b3d4f

Please sign in to comment.