From 0e7c5311690aa81ca40ba02083a4d107ff1ed109 Mon Sep 17 00:00:00 2001 From: sydarn Date: Tue, 21 Nov 2023 22:00:40 +0100 Subject: [PATCH] ODBETA: use 320x240 sdl surface when not hw scaling on 320x480 LCDs --- configure | 1 + platform/common/plat_sdl.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/configure b/configure index aede7215..3c88c6a2 100755 --- a/configure +++ b/configure @@ -127,6 +127,7 @@ set_platform() odbeta) # various devices with opendingux beta, arch flags from toolchain default MFLAGS="" + CFLAGS="$CFLAGS -D__ODBETA__" platform="opendingux" ;; pandora) diff --git a/platform/common/plat_sdl.c b/platform/common/plat_sdl.c index b6b42610..219b2c34 100644 --- a/platform/common/plat_sdl.c +++ b/platform/common/plat_sdl.c @@ -331,9 +331,20 @@ static void plat_sdl_resize(int w, int h) { // take over new settings if (plat_sdl_screen->w != area.w || plat_sdl_screen->h != area.h) { - g_menuscreen_h = plat_sdl_screen->h; - g_menuscreen_w = plat_sdl_screen->w; - resize_buffers(); +#if defined(__ODBETA__) + if (currentConfig.vscaling != EOPT_SCALE_HW && + plat_sdl_screen->w == 320 && + plat_sdl_screen->h == 480) { + g_menuscreen_h = 240; + g_menuscreen_w = 320; + + } else +#endif + { + g_menuscreen_h = plat_sdl_screen->h; + g_menuscreen_w = plat_sdl_screen->w; + } + resize_buffers(); rendstatus_old = -1; } } -- 2.39.5