From 68c85e2a0bc59b51c520e5dd97cd14fd795a9a5d Mon Sep 17 00:00:00 2001 From: kub Date: Thu, 14 Jan 2021 21:47:19 +0100 Subject: [PATCH] add buffer parameters for menubg_src --- menu.c | 10 +++++++++- menu.h | 8 ++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/menu.c b/menu.c index f32c3ce..e7adb5a 100644 --- a/menu.c +++ b/menu.c @@ -31,13 +31,21 @@ static char static_buff[64]; static int menu_error_time = 0; char menu_error_msg[64] = { 0, }; +// g_menuscreen is the current output buffer the menu is rendered to. void *g_menuscreen_ptr; -void *g_menubg_src_ptr; +// g_menubg is the menu background and has the same w/h as g_menuscreen, but +// pp=w. It is filled on menu entry from file or from g_menubg_src if available. void *g_menubg_ptr; +// g_menubg_src points to a buffer containing a bg image. This is usually either +// the emulator screen buffer or the host frame buffer. +void *g_menubg_src_ptr; int g_menuscreen_w; int g_menuscreen_h; int g_menuscreen_pp; +int g_menubg_src_w; +int g_menubg_src_h; +int g_menubg_src_pp; int g_autostateld_opt; diff --git a/menu.h b/menu.h index 2597ab0..dfcc0bc 100644 --- a/menu.h +++ b/menu.h @@ -112,12 +112,16 @@ typedef struct extern me_bind_action me_ctrl_actions[]; extern me_bind_action emuctrl_actions[]; // platform code -extern void *g_menubg_src_ptr; -extern void *g_menubg_ptr; extern void *g_menuscreen_ptr; +extern void *g_menubg_ptr; +extern void *g_menubg_src_ptr; + extern int g_menuscreen_w; extern int g_menuscreen_h; extern int g_menuscreen_pp; // pitch (in pixels) +extern int g_menubg_src_w; +extern int g_menubg_src_h; +extern int g_menubg_src_pp; extern int g_autostateld_opt; -- 2.39.5