mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-13 16:01:05 +00:00
(RMenu) Do video rendering in RMenu after input - same as RGUI - will also
avoid having to 'skip' video swap when doing the render cached frame call
This commit is contained in:
parent
9e09ba8a0a
commit
0f60833cac
@ -3402,7 +3402,6 @@ bool menu_iterate(void)
|
||||
static uint64_t input = 0;
|
||||
static uint64_t old_state = 0;
|
||||
font_params_t font_parms = {0};
|
||||
DEVICE_CAST device_ptr = (DEVICE_CAST)driver.video_data;
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_PREINIT))
|
||||
{
|
||||
@ -3423,21 +3422,6 @@ bool menu_iterate(void)
|
||||
|
||||
g_extern.frame_count++;
|
||||
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE)))
|
||||
{
|
||||
if (driver.video_poke && driver.video_poke->set_texture_enable)
|
||||
{
|
||||
driver.video_poke->set_texture_frame(driver.video_data, menu_texture->pixels,
|
||||
true, menu_texture->width, menu_texture->height, 1.0f);
|
||||
driver.video_poke->set_texture_enable(driver.video_data, true);
|
||||
}
|
||||
}
|
||||
|
||||
// draw last frame for loading messages
|
||||
rarch_render_cached_frame();
|
||||
|
||||
if (driver.video_poke && driver.video_poke->set_texture_enable)
|
||||
driver.video_poke->set_texture_enable(driver.video_data, false);
|
||||
|
||||
//first button input frame
|
||||
uint64_t input_state_first_frame = 0;
|
||||
@ -3564,8 +3548,6 @@ bool menu_iterate(void)
|
||||
driver.video_poke->set_osd_msg(driver.video_data, msg, &font_parms);
|
||||
}
|
||||
|
||||
device_ptr->ctx_driver->swap_buffers();
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_INGAME_EXIT) &&
|
||||
g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_INGAME))
|
||||
{
|
||||
@ -3573,6 +3555,22 @@ bool menu_iterate(void)
|
||||
g_extern.lifecycle_mode_state &= ~((1ULL << MODE_MENU_INGAME) | (1ULL << MODE_MENU_INGAME_EXIT));
|
||||
}
|
||||
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE)))
|
||||
{
|
||||
if (driver.video_poke && driver.video_poke->set_texture_enable)
|
||||
{
|
||||
driver.video_poke->set_texture_frame(driver.video_data, menu_texture->pixels,
|
||||
true, menu_texture->width, menu_texture->height, 1.0f);
|
||||
driver.video_poke->set_texture_enable(driver.video_data, true);
|
||||
}
|
||||
}
|
||||
|
||||
// draw last frame for loading messages
|
||||
rarch_render_cached_frame();
|
||||
|
||||
if (driver.video_poke && driver.video_poke->set_texture_enable)
|
||||
driver.video_poke->set_texture_enable(driver.video_data, false);
|
||||
|
||||
if (input_entry_ret != 0 || input_process_ret != 0)
|
||||
goto deinit;
|
||||
|
||||
|
5
gfx/gl.c
5
gfx/gl.c
@ -1493,10 +1493,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RMENU
|
||||
if (!(lifecycle_mode_state & (1ULL << MODE_MENU_DRAW)))
|
||||
#endif
|
||||
context_swap_buffers_func();
|
||||
context_swap_buffers_func();
|
||||
|
||||
#if !defined(HAVE_OPENGLES) && defined(HAVE_FFMPEG)
|
||||
if (gl->pbo_readback_enable)
|
||||
|
Loading…
x
Reference in New Issue
Block a user