From 1d1140db1cfd31355d69f4a0cdac0b5308764152 Mon Sep 17 00:00:00 2001 From: Nikos Chantziaras Date: Wed, 2 Feb 2022 02:22:15 +0200 Subject: [PATCH] libretro: Fix 4:3 aspect ratio to actually be 4:3 regardless of cropping --- libretro/libretro.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index bb4ebc53..4ddf9fa0 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -49,8 +49,6 @@ static int g_screen_gun_height = SNES_HEIGHT; #define RETRO_GAME_TYPE_MULTI_CART 0x105 | 0x1000 -#define SNES_4_3 4.0f / 3.0f - uint16 *screen_buffer = NULL; char g_rom_dir[1024]; @@ -788,7 +786,7 @@ float get_aspect_ratio(unsigned width, unsigned height) { if (aspect_ratio_mode == ASPECT_RATIO_4_3) { - return SNES_4_3; + return (4.0f * (MAX_SNES_HEIGHT - height)) / (3.0f * (MAX_SNES_WIDTH - width)); } else if (aspect_ratio_mode == ASPECT_RATIO_1_1) {