From: sydarn Date: Tue, 21 Nov 2023 21:00:40 +0000 (+0100) Subject: ODBETA: use 320x240 sdl surface when not hw scaling on 320x480 LCDs X-Git-Tag: v2.00~150 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e7c5311690aa81ca40ba02083a4d107ff1ed109;p=picodrive.git ODBETA: use 320x240 sdl surface when not hw scaling on 320x480 LCDs --- 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; } }