Don't increment g_runloop.frames.video.count inside video driver

implementation's 'frame' function - do this outside
This commit is contained in:
twinaphex 2015-03-07 13:28:45 +01:00
parent d11006e041
commit 3276781b4f
10 changed files with 7 additions and 20 deletions

View File

@ -1461,8 +1461,6 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width,
if (exynos_flip(vid->data, page) != 0)
goto fail;
g_runloop.frames.video.count++;
return true;
fail:

View File

@ -1681,8 +1681,6 @@ static bool gl_frame(void *data, const void *frame,
context_bind_hw_render(gl, true);
g_runloop.frames.video.count++;
return true;
}

View File

@ -1149,8 +1149,6 @@ static bool gx_frame(void *data, const void *frame,
VISetNextFrameBuffer(g_framebuf[g_current_framebuf]);
VIFlush();
g_runloop.frames.video.count++;
RARCH_PERFORMANCE_STOP(gx_frame);
return true;

View File

@ -1000,8 +1000,6 @@ static bool omap_gfx_frame(void *data, const void *frame, unsigned width,
if (msg)
omap_render_msg(vid, msg);
g_runloop.frames.video.count++;
return true;
}

View File

@ -527,8 +527,6 @@ static bool psp_frame(void *data, const void *frame,
#endif
psp->draw_buffer = FROM_GU_POINTER(sceGuSwapBuffers());
g_runloop.frames.video.count++;
RARCH_PERFORMANCE_INIT(psp_frame_run);
RARCH_PERFORMANCE_START(psp_frame_run);

View File

@ -517,8 +517,6 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width,
if (video_monitor_get_fps(buf, sizeof(buf), NULL, 0))
SDL_SetWindowTitle(vid->window, buf);
g_runloop.frames.video.count++;
return true;
}

View File

@ -376,7 +376,6 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width,
SDL_WM_SetCaption(buf, NULL);
SDL_Flip(vid->screen);
g_runloop.frames.video.count++;
return true;
}

View File

@ -775,7 +775,6 @@ static bool xv_frame(void *data, const void *frame, unsigned width,
if (video_monitor_get_fps(buf, sizeof(buf), NULL, 0))
XStoreName(xv->display, xv->window, buf);
g_runloop.frames.video.count++;
return true;
}

View File

@ -147,10 +147,6 @@ static void gfx_ctx_d3d_update_title(void *data)
#endif
msg_queue_push(g_runloop.msg_queue, buffer_fps, 1, 1);
}
#ifndef _XBOX
g_runloop.frames.video.count++;
#endif
}
static void gfx_ctx_d3d_show_mouse(void *data, bool state)

View File

@ -148,8 +148,13 @@ static void video_frame(const void *data, unsigned width,
pitch = output_pitch;
}
if (!driver.video->frame(driver.video_data, data, width, height, pitch, msg))
driver.video_active = false;
if (driver.video->frame(driver.video_data, data, width, height, pitch, msg))
{
g_runloop.frames.video.count++;
return;
}
driver.video_active = false;
}
/**