From dc01bf8d467f7bb4a9d08455d2723ae5a9ac707f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Jos=C3=A9=20Garc=C3=ADa=20Garc=C3=ADa?= Date: Thu, 9 Jul 2020 18:48:08 +0200 Subject: [PATCH] [Vita][GL] Fix returning to menu and clear for fake hw render --- gfx/drivers/gl1.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gfx/drivers/gl1.c b/gfx/drivers/gl1.c index c8299a38f4..06c4ec9bdb 100644 --- a/gfx/drivers/gl1.c +++ b/gfx/drivers/gl1.c @@ -708,9 +708,6 @@ static bool gl1_gfx_frame(void *data, const void *frame, video_info->xmb_shadows_enable = false; video_info->menu_shader_pipeline = 0; - if (!frame || !frame_width || !frame_height) - return true; - if (gl1->should_resize) { gfx_ctx_mode_t mode; @@ -757,7 +754,7 @@ static bool gl1_gfx_frame(void *data, const void *frame, pot_width = get_pot(width); pot_height = get_pot(height); - if ( frame == RETRO_HW_FRAME_BUFFER_VALID || ( + if ( !frame || frame == RETRO_HW_FRAME_BUFFER_VALID || ( frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) @@ -792,9 +789,6 @@ static bool gl1_gfx_frame(void *data, const void *frame, if (draw) { - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -914,6 +908,9 @@ static bool gl1_gfx_frame(void *data, const void *frame, glClear(GL_COLOR_BUFFER_BIT); glFinish(); } + + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); gl1_context_bind_hw_render(gl1, true);