diff --git a/core_info.c b/core_info.c index a016d5f0ea..3f31480f54 100644 --- a/core_info.c +++ b/core_info.c @@ -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++) { diff --git a/retroarch.c b/retroarch.c index 7fee571ac2..db5973966d 100644 --- a/retroarch.c +++ b/retroarch.c @@ -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 diff --git a/retroarch.h b/retroarch.h index 9d9b8da6ae..9df8ffa94d 100644 --- a/retroarch.h +++ b/retroarch.h @@ -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);