diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 102313b44b..e870d6eb7f 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1166,7 +1166,7 @@ static bool gl_frame(void *data, const void *frame, glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); /* Can be NULL for frame dupe / NULL render. */ - if (frame) + if (frame && video_info->libretro_running) { #ifdef HAVE_FBO if (!gl->hw_render_fbo_init) diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 6b9cea9b80..222c74d976 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -507,7 +507,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, if (vid->should_resize) sdl_refresh_viewport(vid); - if (frame) + if (frame && video_info->libretro_running) { static struct retro_perf_counter sdl_copy_frame = {0}; diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 0481a84896..037aa3cd42 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1523,10 +1523,10 @@ static bool vulkan_frame(void *data, const void *frame, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { - struct vk_per_frame *chain; VkSemaphore signal_semaphores[2]; VkClearValue clear_value; vk_t *vk = (vk_t*)data; + struct vk_per_frame *chain = NULL; static struct retro_perf_counter frame_run = {0}; static struct retro_perf_counter begin_cmd = {0}; static struct retro_perf_counter build_cmd = {0}; @@ -1597,7 +1597,7 @@ static bool vulkan_frame(void *data, const void *frame, /* Upload texture */ performance_counter_start(©_frame); - if (frame && !vk->hw.enable) + if (frame && !vk->hw.enable && video_info->libretro_running) { unsigned y; uint8_t *dst = NULL;