From b01c1ec5b866d90554953b32078b46d62b1abb32 Mon Sep 17 00:00:00 2001 From: kub Date: Thu, 11 Nov 2021 22:35:08 +0100 Subject: [PATCH] platform, fix horizontal upscaling for 8bit renderers --- platform/linux/emu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/platform/linux/emu.c b/platform/linux/emu.c index 1dbd146a..a6c4cb79 100644 --- a/platform/linux/emu.c +++ b/platform/linux/emu.c @@ -110,11 +110,11 @@ void screen_blit(u16 *pd, int pp, u8* ps, int ss, u16 *pal) upscale_rgb_nn_x_4_5_y_16_17, upscale_rgb_snn_x_4_5_y_16_17, upscale_rgb_bl2_x_4_5_y_16_17, upscale_rgb_bl4_x_4_5_y_16_17, }; - static const upscale_t upscale_256_224_h[] = { + static const upscale_t upscale_256_____h[] = { upscale_rgb_nn_x_4_5, upscale_rgb_snn_x_4_5, upscale_rgb_bl2_x_4_5, upscale_rgb_bl4_x_4_5, }; - static const upscale_t upscale_256_224_v[] = { + static const upscale_t upscale_____224_v[] = { upscale_rgb_nn_y_16_17, upscale_rgb_snn_y_16_17, upscale_rgb_bl2_y_16_17, upscale_rgb_bl4_y_16_17, }; @@ -122,11 +122,11 @@ void screen_blit(u16 *pd, int pp, u8* ps, int ss, u16 *pal) upscale_rgb_nn_x_1_2_y_3_5, upscale_rgb_nn_x_1_2_y_3_5, upscale_rgb_bl2_x_1_2_y_3_5, upscale_rgb_bl4_x_1_2_y_3_5, }; - static const upscale_t upscale_160_144_h[] = { + static const upscale_t upscale_160_____h[] = { upscale_rgb_nn_x_1_2, upscale_rgb_nn_x_1_2, upscale_rgb_bl2_x_1_2, upscale_rgb_bl2_x_1_2, }; - static const upscale_t upscale_160_144_v[] = { + static const upscale_t upscale_____144_v[] = { upscale_rgb_nn_y_3_5, upscale_rgb_nn_y_3_5, upscale_rgb_bl2_y_3_5, upscale_rgb_bl4_y_3_5, }; @@ -135,16 +135,16 @@ void screen_blit(u16 *pd, int pp, u8* ps, int ss, u16 *pal) // handle software upscaling upscale = NULL; - if (currentConfig.scaling == EOPT_SCALE_SW) { + if (currentConfig.scaling == EOPT_SCALE_SW && out_w <= 256) { if (currentConfig.vscaling == EOPT_SCALE_SW && out_h <= 224) // h+v scaling - upscale = out_w == 256 ? upscale_256_224_hv: upscale_160_144_hv; + upscale = out_w >= 256 ? upscale_256_224_hv: upscale_160_144_hv; else // h scaling - upscale = out_w == 256 ? upscale_256_224_h : upscale_160_144_h; + upscale = out_w >= 256 ? upscale_256_____h : upscale_160_____h; } else if (currentConfig.vscaling == EOPT_SCALE_SW && out_h <= 224) // v scaling - upscale = out_w == 256 ? upscale_256_224_v : upscale_160_144_v; + upscale = out_w >= 256 ? upscale_____224_v : upscale_____144_v; if (!upscale) { // no scaling for (y = 0; y < out_h; y++) -- 2.39.5