mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-19 07:16:21 +00:00
Don't touch driver->frontend outside of frontend_driver.c anymore
This commit is contained in:
parent
f16fc89b1b
commit
c36b8e1ae9
@ -176,4 +176,20 @@ environment_get_t frontend_driver_environment_get_ptr(void)
|
||||
return NULL;
|
||||
return driver->frontend_ctx->environment_get;
|
||||
}
|
||||
|
||||
bool frontend_driver_has_get_video_driver_func(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
if (!driver || !driver->frontend_ctx || !driver->frontend_ctx->get_video_driver)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
const struct video_driver *frontend_driver_get_video_driver(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
if (!driver || !driver->frontend_ctx || !driver->frontend_ctx->get_video_driver)
|
||||
return NULL;
|
||||
return driver->frontend_ctx->get_video_driver();
|
||||
}
|
||||
#endif
|
||||
|
@ -124,6 +124,9 @@ void frontend_driver_init_first(void *args);
|
||||
|
||||
environment_get_t frontend_driver_environment_get_ptr(void);
|
||||
|
||||
bool frontend_driver_has_get_video_driver_func(void);
|
||||
|
||||
const struct video_driver *frontend_driver_get_video_driver(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -241,10 +241,9 @@ static bool find_video_driver(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (driver->frontend_ctx &&
|
||||
driver->frontend_ctx->get_video_driver)
|
||||
if (frontend_driver_has_get_video_driver_func())
|
||||
{
|
||||
current_video = driver->frontend_ctx->get_video_driver();
|
||||
current_video = frontend_driver_get_video_driver();
|
||||
|
||||
if (current_video)
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user