From 468d76ef43613d8416aa6377bc359760343499fc Mon Sep 17 00:00:00 2001 From: CosmosXIII <82299148+CosmosXIII@users.noreply.github.com> Date: Sun, 2 Jun 2024 16:29:57 +0900 Subject: [PATCH] FF7: Fix movie aspect ratio in true widescreen mode (#702) --- src/gl/gl.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gl/gl.cpp b/src/gl/gl.cpp index 3f2310c2..db12eabc 100644 --- a/src/gl/gl.cpp +++ b/src/gl/gl.cpp @@ -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; @@ -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; } }