Only show the frame when libretro_running is true

This commit is contained in:
twinaphex 2017-01-22 21:42:42 +01:00
parent 1410668d34
commit 8698525f86
3 changed files with 4 additions and 4 deletions

View File

@ -1166,7 +1166,7 @@ static bool gl_frame(void *data, const void *frame,
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
/* Can be NULL for frame dupe / NULL render. */ /* Can be NULL for frame dupe / NULL render. */
if (frame) if (frame && video_info->libretro_running)
{ {
#ifdef HAVE_FBO #ifdef HAVE_FBO
if (!gl->hw_render_fbo_init) if (!gl->hw_render_fbo_init)

View File

@ -507,7 +507,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width,
if (vid->should_resize) if (vid->should_resize)
sdl_refresh_viewport(vid); sdl_refresh_viewport(vid);
if (frame) if (frame && video_info->libretro_running)
{ {
static struct retro_perf_counter sdl_copy_frame = {0}; static struct retro_perf_counter sdl_copy_frame = {0};

View File

@ -1523,10 +1523,10 @@ static bool vulkan_frame(void *data, const void *frame,
uint64_t frame_count, uint64_t frame_count,
unsigned pitch, const char *msg, video_frame_info_t *video_info) unsigned pitch, const char *msg, video_frame_info_t *video_info)
{ {
struct vk_per_frame *chain;
VkSemaphore signal_semaphores[2]; VkSemaphore signal_semaphores[2];
VkClearValue clear_value; VkClearValue clear_value;
vk_t *vk = (vk_t*)data; 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 frame_run = {0};
static struct retro_perf_counter begin_cmd = {0}; static struct retro_perf_counter begin_cmd = {0};
static struct retro_perf_counter build_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 */ /* Upload texture */
performance_counter_start(&copy_frame); performance_counter_start(&copy_frame);
if (frame && !vk->hw.enable) if (frame && !vk->hw.enable && video_info->libretro_running)
{ {
unsigned y; unsigned y;
uint8_t *dst = NULL; uint8_t *dst = NULL;