Create video_driver_overlay_interface

This commit is contained in:
twinaphex 2015-03-22 23:44:58 +01:00
parent 7243c43cda
commit da53a4c683
3 changed files with 18 additions and 3 deletions

View File

@ -784,3 +784,18 @@ bool video_driver_focus(void)
return false;
return driver->video->focus(driver->video_data);
}
bool video_driver_overlay_interface(const video_overlay_interface_t **iface)
{
driver_t *driver = driver_get_ptr();
if (!driver)
return false;
if (!driver->video)
return false;
if (driver->video && driver->video->overlay_interface)
driver->video->overlay_interface(driver->video_data, iface);
return true;
}

View File

@ -305,6 +305,8 @@ bool video_driver_set_shader(enum rarch_shader_type type,
bool video_driver_focus(void);
bool video_driver_overlay_interface(const video_overlay_interface_t **iface);
#ifdef __cplusplus
}
#endif

View File

@ -800,14 +800,12 @@ input_overlay_t *input_overlay_new(const char *path, bool enable,
if (!ol->conf)
goto error;
if (!driver->video->overlay_interface)
if (!video_driver_overlay_interface(&ol->iface))
{
RARCH_ERR("Overlay interface is not present in video driver.\n");
goto error;
}
if (driver->video && driver->video->overlay_interface)
driver->video->overlay_interface(driver->video_data, &ol->iface);
ol->iface_data = driver->video_data;
if (!ol->iface)