Start using video_driver_get_flags_wrapper again

This commit is contained in:
twinaphex 2020-07-27 06:40:30 +02:00
parent 4120abd4d4
commit 9db00e4143
3 changed files with 16 additions and 3 deletions

View File

@ -1285,10 +1285,10 @@ bool core_info_hw_api_supported(core_info_t *info)
#ifdef RARCH_INTERNAL
unsigned i;
enum gfx_ctx_api sys_api;
gfx_ctx_flags_t sys_flags = {0};
const char *sys_api_version_str = video_driver_get_gpu_api_version_string();
int sys_api_version_major = 0;
int sys_api_version_minor = 0;
const char *sys_api_version_str = video_driver_get_gpu_api_version_string();
gfx_ctx_flags_t sys_flags = video_driver_get_flags_wrapper();
enum api_parse_state
{
@ -1301,7 +1301,6 @@ bool core_info_hw_api_supported(core_info_t *info)
return true;
sys_api = video_context_driver_get_api();
video_context_driver_get_flags(&sys_flags);
for (i = 0; i < info->required_hw_api_list->size; i++)
{

View File

@ -33501,6 +33501,18 @@ static bool video_driver_get_flags(gfx_ctx_flags_t *flags)
return true;
}
gfx_ctx_flags_t video_driver_get_flags_wrapper(void)
{
gfx_ctx_flags_t flags;
struct rarch_state *p_rarch = &rarch_st;
flags.flags = 0;
if (!video_driver_get_flags(&flags))
video_context_driver_get_flags(&flags);
return flags;
}
/**
* video_driver_test_all_flags:
* @testflag : flag to test

View File

@ -1812,6 +1812,8 @@ bool video_context_driver_get_flags(gfx_ctx_flags_t *flags);
bool video_driver_test_all_flags(enum display_flags testflag);
gfx_ctx_flags_t video_driver_get_flags_wrapper(void);
void video_driver_set_gpu_device_string(const char *str);
const char* video_driver_get_gpu_device_string(void);