mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-01 01:03:11 +00:00
Create local frame_count variables again in video_drivers
This commit is contained in:
parent
0658bcd84b
commit
4ecfe639b3
@ -1737,6 +1737,8 @@ static bool d3d_frame(void *data, const void *frame,
|
||||
|
||||
gfx_ctx_swap_buffers(d3d);
|
||||
|
||||
d3d->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,7 @@ typedef struct gl_shader_backend gl_shader_backend_t;
|
||||
|
||||
typedef struct d3d_video
|
||||
{
|
||||
uint64_t frame_count;
|
||||
bool should_resize;
|
||||
bool quitting;
|
||||
|
||||
|
@ -63,6 +63,7 @@ typedef struct ctr_video
|
||||
ctr_vertex_t* frame_coords;
|
||||
}menu;
|
||||
|
||||
uint64_t frame_count;
|
||||
uint32_t* display_list;
|
||||
int display_list_size;
|
||||
void* texture_linear;
|
||||
@ -360,6 +361,9 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), 240,400,CTRGU_RGB8, CTRGU_MULTISAMPLE_NONE);
|
||||
|
||||
RARCH_PERFORMANCE_STOP(ctrframe_f);
|
||||
|
||||
ctr->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,8 @@
|
||||
#define NUMPAGES 2
|
||||
|
||||
struct dispmanx_video
|
||||
{
|
||||
{
|
||||
uint64_t frame_count;
|
||||
DISPMANX_DISPLAY_HANDLE_T display;
|
||||
DISPMANX_MODEINFO_T amode;
|
||||
DISPMANX_UPDATE_HANDLE_T update;
|
||||
@ -382,19 +383,19 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
|
||||
if (width != _dispvars->width || height != _dispvars->height)
|
||||
{
|
||||
/* Sanity check. */
|
||||
if (width == 0 || height == 0)
|
||||
return true;
|
||||
/* Sanity check. */
|
||||
if (width == 0 || height == 0)
|
||||
return true;
|
||||
|
||||
RARCH_LOG("video_dispmanx: internal frame resolution changed by core\n");
|
||||
|
||||
if (!dispmanx_setup_scale(_dispvars, width, height, pitch))
|
||||
{
|
||||
RARCH_ERR("video_dispmanx: frame resolution set failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
dispmanx_blank_console (_dispvars);
|
||||
RARCH_LOG("video_dispmanx: internal frame resolution changed by core\n");
|
||||
|
||||
if (!dispmanx_setup_scale(_dispvars, width, height, pitch))
|
||||
{
|
||||
RARCH_ERR("video_dispmanx: frame resolution set failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
dispmanx_blank_console (_dispvars);
|
||||
}
|
||||
|
||||
if (_dispvars->menu_active)
|
||||
@ -406,6 +407,8 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
/* Update main game screen: locate free page, blit and flip. */
|
||||
dispmanx_update_main(_dispvars, frame);
|
||||
|
||||
_dispvars->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1471,6 +1471,8 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
if (exynos_flip(vid->data, page) != 0)
|
||||
goto fail;
|
||||
|
||||
vid->frame_count++;
|
||||
|
||||
return true;
|
||||
|
||||
fail:
|
||||
|
@ -1708,6 +1708,8 @@ static bool gl_frame(void *data, const void *frame,
|
||||
|
||||
context_bind_hw_render(gl, true);
|
||||
|
||||
gl->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -245,6 +245,7 @@ struct gl_font_renderer;
|
||||
|
||||
typedef struct gl
|
||||
{
|
||||
uint64_t frame_count;
|
||||
const shader_backend_t *shader;
|
||||
|
||||
bool vsync;
|
||||
@ -262,8 +263,6 @@ typedef struct gl
|
||||
void *conv_buffer;
|
||||
struct scaler_ctx scaler;
|
||||
|
||||
unsigned frame_count;
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
/* Render-to-texture, multipass shaders. */
|
||||
GLuint fbo[MAX_SHADERS];
|
||||
|
@ -46,6 +46,7 @@ struct gx_overlay_data
|
||||
|
||||
typedef struct gx_video
|
||||
{
|
||||
uint64_t frame_count;
|
||||
bool should_resize;
|
||||
bool keep_aspect;
|
||||
bool double_strike;
|
||||
@ -1158,6 +1159,8 @@ static bool gx_frame(void *data, const void *frame,
|
||||
|
||||
RARCH_PERFORMANCE_STOP(gx_frame);
|
||||
|
||||
gx->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -770,6 +770,7 @@ static void omapfb_blit_frame(omapfb_data_t *pdata, const void *src,
|
||||
|
||||
typedef struct omap_video
|
||||
{
|
||||
uint64_t frame_count;
|
||||
omapfb_data_t *omap;
|
||||
|
||||
void *font;
|
||||
@ -981,11 +982,10 @@ fail:
|
||||
static bool omap_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
unsigned height, unsigned pitch, const char *msg)
|
||||
{
|
||||
omap_video_t *vid;
|
||||
omap_video_t *vid = (omap_video_t*)data;
|
||||
|
||||
if (!frame)
|
||||
return true;
|
||||
vid = data;
|
||||
|
||||
if (width > 4 && height > 4 && (width != vid->width || height != vid->height))
|
||||
{
|
||||
@ -1010,6 +1010,8 @@ static bool omap_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
if (msg)
|
||||
omap_render_msg(vid, msg);
|
||||
|
||||
vid->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,7 @@ typedef struct psp1_menu_frame
|
||||
|
||||
typedef struct psp1_video
|
||||
{
|
||||
uint64_t frame_count;
|
||||
void* main_dList;
|
||||
void* frame_dList;
|
||||
void* draw_buffer;
|
||||
@ -525,6 +526,7 @@ static bool psp_frame(void *data, const void *frame,
|
||||
#endif
|
||||
|
||||
psp->draw_buffer = FROM_GU_POINTER(sceGuSwapBuffers());
|
||||
psp->frame_count++;
|
||||
|
||||
RARCH_PERFORMANCE_INIT(psp_frame_run);
|
||||
RARCH_PERFORMANCE_START(psp_frame_run);
|
||||
|
@ -51,6 +51,7 @@ typedef struct sdl2_tex
|
||||
|
||||
typedef struct _sdl2_video
|
||||
{
|
||||
uint64_t frame_count;
|
||||
SDL_Window *window;
|
||||
SDL_Renderer *renderer;
|
||||
|
||||
@ -518,6 +519,8 @@ 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);
|
||||
|
||||
vid->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ typedef struct sdl_menu_frame
|
||||
|
||||
typedef struct sdl_video
|
||||
{
|
||||
uint64_t frame_count;
|
||||
SDL_Surface *screen;
|
||||
bool quitting;
|
||||
|
||||
@ -377,6 +378,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
|
||||
SDL_Flip(vid->screen);
|
||||
|
||||
vid->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -498,6 +498,7 @@ struct sunxi_page
|
||||
|
||||
struct sunxi_video
|
||||
{
|
||||
uint64_t frame_count;
|
||||
void *font;
|
||||
const font_renderer_driver_t *font_driver;
|
||||
|
||||
@ -802,6 +803,8 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
|
||||
sunxi_update_main(frame, _dispvars);
|
||||
|
||||
_dispvars->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint64_t frame_count;
|
||||
bool should_resize;
|
||||
float mScreenAspect;
|
||||
bool mKeepAspect;
|
||||
@ -364,9 +365,7 @@ static void vg_copy_frame(void *data, const void *frame,
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vgImageSubData(vg->mImage, frame, pitch, vg->mTexType, 0, 0, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
static bool vg_frame(void *data, const void *frame,
|
||||
@ -415,6 +414,8 @@ static bool vg_frame(void *data, const void *frame,
|
||||
|
||||
gfx_ctx_swap_buffers(vg);
|
||||
|
||||
vg->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,7 @@ static bool g_quitting;
|
||||
|
||||
typedef struct gl
|
||||
{
|
||||
uint64_t frame_count;
|
||||
unsigned char *screen;
|
||||
struct XenosVertexBuffer *vb;
|
||||
struct XenosDevice * gl_device;
|
||||
@ -238,6 +239,8 @@ static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, un
|
||||
Xe_Resolve(vid->gl_device);
|
||||
Xe_Sync(vid->gl_device);
|
||||
|
||||
vid->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
typedef struct xv
|
||||
{
|
||||
uint64_t frame_count;
|
||||
Display *display;
|
||||
GC gc;
|
||||
Window window;
|
||||
@ -787,6 +788,8 @@ 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);
|
||||
|
||||
xv->frame_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user