From 1106272c845ba9a0e555959da2b08d42359ef9cb Mon Sep 17 00:00:00 2001 From: kub Date: Thu, 6 May 2021 22:19:16 +0200 Subject: [PATCH] ui, scaling in sdl window mode (ATM hidden) --- platform/common/menu_pico.c | 3 +-- platform/common/plat_sdl.c | 2 +- platform/linux/menu.c | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 platform/linux/menu.c diff --git a/platform/common/menu_pico.c b/platform/common/menu_pico.c index f1cc9fc5..6a6da396 100644 --- a/platform/common/menu_pico.c +++ b/platform/common/menu_pico.c @@ -78,8 +78,7 @@ static const char *men_dummy[] = { NULL }; #elif defined(PANDORA) #include #else -#define MENU_OPTIONS_GFX -#define MENU_OPTIONS_ADV +#include #endif static void make_bg(int no_scale, int from_screen) diff --git a/platform/common/plat_sdl.c b/platform/common/plat_sdl.c index 2cdb1979..5edeb79e 100644 --- a/platform/common/plat_sdl.c +++ b/platform/common/plat_sdl.c @@ -230,7 +230,7 @@ void plat_video_loop_prepare(void) // take over any new vout settings XXX ask plat_sdl for scaling instead! plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 0); // switch over to scaled output if available - if (plat_sdl_overlay != NULL || plat_sdl_gl_active) { + if (plat_sdl_overlay != NULL || plat_sdl_gl_active || currentConfig.scaling != EOPT_SCALE_NONE) { g_screen_width = 320; g_screen_height = 240; g_screen_ppitch = g_screen_width; diff --git a/platform/linux/menu.c b/platform/linux/menu.c new file mode 100644 index 00000000..b9bf4cee --- /dev/null +++ b/platform/linux/menu.c @@ -0,0 +1,16 @@ +#include "../libpicofe/gp2x/plat_gp2x.h" + +// ------------ gfx options menu ------------ + + +const char *men_scaling_opts[] = { "OFF", "ON", NULL }; + +#define MENU_OPTIONS_GFX \ + // mee_enum ("screen scaling", MA_OPT_SCALING, currentConfig.scaling, men_scaling_opts), \ + +#define MENU_OPTIONS_ADV + +void linux_menu_init(void) +{ +} + -- 2.39.5