Skip to content

Commit

Permalink
FF7: Fix movie aspect ratio in true widescreen mode (julianxhokaxhiu#702
Browse files Browse the repository at this point in the history
)
  • Loading branch information
CosmosXIII authored Jun 2, 2024
1 parent b2db930 commit 468d76e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/gl/gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ extern uint32_t nodefer;
void gl_draw_movie_quad_common(uint32_t width, uint32_t height)
{
struct game_obj *game_object = common_externals.get_game_object();
float ratio = game_width / (float)width;
uint32_t cur_game_width = game_width;
if (!ff8)
{
if (widescreen.getMovieMode() == WM_EXTEND_ONLY)
{
cur_game_width = wide_game_width;
}
}

float ratio = cur_game_width / (float)width;
float movieHeight = ratio * height;
float movieWidth = ratio * width;
float movieOffsetY = (game_height - movieHeight) / 2.0f;
Expand All @@ -76,7 +85,7 @@ void gl_draw_movie_quad_common(uint32_t width, uint32_t height)
movie_quad_width = wide_game_width;
} else if (widescreen.getMovieMode() == WM_EXTEND_ONLY)
{
movie_quad_x = wide_viewport_x;
movie_quad_x = (game_width - movieWidth) / 2.0f;
}
}

Expand Down

0 comments on commit 468d76e

Please sign in to comment.