mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-02 21:37:14 +00:00
(GX) Alpha blended image overlay when exiting back to menu
This commit is contained in:
parent
c76a4b4092
commit
ab0ce82b1e
@ -130,10 +130,14 @@ static bool folder_cb(const char *directory, rgui_file_enum_cb_t file_cb,
|
||||
|
||||
static bool get_rom_path(rgui_handle_t *rgui)
|
||||
{
|
||||
gx_video_t *gx = (gx_video_t*)driver.video_data;
|
||||
|
||||
uint16_t old_input_state = 0;
|
||||
bool can_quit = false;
|
||||
bool first = true;
|
||||
|
||||
gx->menu_render = true;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
uint16_t input_state = 0;
|
||||
@ -183,9 +187,8 @@ static bool get_rom_path(rgui_handle_t *rgui)
|
||||
}
|
||||
|
||||
const char *ret = rgui_iterate(rgui, action);
|
||||
video_wii.frame(NULL, NULL,
|
||||
0, 0,
|
||||
0, NULL);
|
||||
|
||||
rarch_render_cached_frame();
|
||||
|
||||
if (ret)
|
||||
{
|
||||
@ -275,6 +278,7 @@ int main(void)
|
||||
|
||||
while (get_rom_path(rgui) && ret == 0)
|
||||
{
|
||||
gx->menu_render = false;
|
||||
bool repeat = false;
|
||||
|
||||
input_wii.poll(NULL);
|
||||
|
@ -362,6 +362,7 @@ static void update_texture(const uint32_t *src,
|
||||
}
|
||||
|
||||
// TODO: only convert when menu is visible
|
||||
if(gx->menu_render)
|
||||
{
|
||||
uint16_t *block = (uint16_t *) menu_tex.data;
|
||||
uint16_t *line[4];
|
||||
@ -396,11 +397,14 @@ static bool wii_frame(void *data, const void *frame,
|
||||
unsigned width, unsigned height, unsigned pitch,
|
||||
const char *msg)
|
||||
{
|
||||
gx_video_t *gx = (gx_video_t*)driver.video_data;
|
||||
bool menu_render = gx->menu_render;
|
||||
|
||||
(void)data;
|
||||
(void)msg;
|
||||
|
||||
//if(!frame)
|
||||
// return true;
|
||||
if(!frame && !menu_render)
|
||||
return true;
|
||||
|
||||
while (g_vsync && !g_draw_done)
|
||||
LWP_ThreadSleep(g_video_cond);
|
||||
@ -408,13 +412,15 @@ static bool wii_frame(void *data, const void *frame,
|
||||
g_draw_done = false;
|
||||
g_current_framebuf ^= 1;
|
||||
update_texture(frame, width, height, pitch);
|
||||
|
||||
if (frame)
|
||||
{
|
||||
GX_LoadTexObj(&g_tex.obj, GX_TEXMAP0);
|
||||
GX_CallDispList(display_list, display_list_size);
|
||||
GX_DrawDone();
|
||||
}
|
||||
else // TODO: in-game menu still needs this
|
||||
|
||||
if(menu_render)
|
||||
{
|
||||
GX_LoadTexObj(&menu_tex.obj, GX_TEXMAP0);
|
||||
GX_CallDispList(display_list, display_list_size);
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
typedef struct gx_video
|
||||
{
|
||||
bool menu_render;
|
||||
uint32_t *menu_data;
|
||||
} gx_video_t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user