Create video_driver_get_frame_count

This commit is contained in:
twinaphex 2015-05-09 15:54:51 +02:00
parent ae408a1d41
commit 5aeb906065
2 changed files with 20 additions and 0 deletions

View File

@ -263,6 +263,24 @@ uintptr_t video_driver_get_current_framebuffer(void)
return 0;
}
uint64_t video_driver_get_frame_count(void)
{
static bool warn_once = true;
driver_t *driver = driver_get_ptr();
const video_poke_interface_t *poke = video_driver_get_poke_ptr();
if (!poke || !poke->get_frame_count)
{
if (warn_once)
{
RARCH_WARN("Frame count not implemented!\n");
warn_once = false;
}
return 0;
}
return poke->get_frame_count(driver->video_data);
}
retro_proc_address_t video_driver_get_proc_address(const char *sym)
{
driver_t *driver = driver_get_ptr();

View File

@ -340,6 +340,8 @@ const char *video_driver_get_ident(void);
bool video_driver_set_viewport(unsigned width, unsigned height,
bool force_fullscreen, bool allow_rotate);
uint64_t video_driver_get_frame_count(void);
#ifdef __cplusplus
}
#endif