ODBETA: use 320x240 sdl surface when not hw scaling on 320x480 LCDs

This commit is contained in:
sydarn 2023-11-21 22:00:40 +01:00 committed by irixxxx
parent c180662e07
commit 0e7c531169
2 changed files with 15 additions and 3 deletions

1
configure vendored
View file

@ -127,6 +127,7 @@ set_platform()
odbeta) odbeta)
# various devices with opendingux beta, arch flags from toolchain default # various devices with opendingux beta, arch flags from toolchain default
MFLAGS="" MFLAGS=""
CFLAGS="$CFLAGS -D__ODBETA__"
platform="opendingux" platform="opendingux"
;; ;;
pandora) pandora)

View file

@ -331,9 +331,20 @@ static void plat_sdl_resize(int w, int h)
{ {
// take over new settings // take over new settings
if (plat_sdl_screen->w != area.w || plat_sdl_screen->h != area.h) { if (plat_sdl_screen->w != area.w || plat_sdl_screen->h != area.h) {
g_menuscreen_h = plat_sdl_screen->h; #if defined(__ODBETA__)
g_menuscreen_w = plat_sdl_screen->w; if (currentConfig.vscaling != EOPT_SCALE_HW &&
resize_buffers(); 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; rendstatus_old = -1;
} }
} }