From: kub Date: Thu, 14 Jan 2021 20:47:19 +0000 (+0100) Subject: add buffer parameters for menubg_src X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68c85e2a0bc59b51c520e5dd97cd14fd795a9a5d;p=libpicofe.git add buffer parameters for menubg_src --- 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;