mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Create video_driver_overlay_interface
This commit is contained in:
parent
7243c43cda
commit
da53a4c683
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user