Skip to content

Commit

Permalink
Fix splash aspect ratio.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyonFlame committed Jul 6, 2023
1 parent 7cca6c0 commit 9e43646
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ports/gmloader/splash.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ static void get_aspect_correct_coords(int viewport[2], int plane[2], float uv[2]

if (aspect_viewport > aspect_plane) {
// viewport wider than plane
ratio_x = ((float)viewport[1] / plane[1]);
ratio_x = aspect_plane / aspect_viewport;
ratio_y = 1.0f;
} else {
// plane wider than viewport
ratio_x = 1.0f;
ratio_y = ((float)viewport[0] / plane[0]);
ratio_y = aspect_viewport / aspect_plane;
}

shift_x = (1.0f - 1.0f * ratio_x) / 2.0f;
Expand Down

0 comments on commit 9e43646

Please sign in to comment.