Optimize check_menu_driver_compatibility

This commit is contained in:
twinaphex 2020-06-10 23:40:29 +02:00
parent 963c01cf48
commit 5aa26e7eee
2 changed files with 18 additions and 9 deletions

View File

@ -2510,20 +2510,30 @@ static bool check_menu_driver_compatibility(settings_t *settings)
return true;
/* TODO/FIXME - maintenance hazard */
if (string_is_equal(video_driver, "d3d9") ||
string_is_equal(video_driver, "d3d10") ||
string_is_equal(video_driver, "d3d11") ||
string_is_equal(video_driver, "d3d12") ||
if (string_starts_with(video_driver, "d3d"))
if (
string_is_equal(video_driver, "d3d9") ||
string_is_equal(video_driver, "d3d10") ||
string_is_equal(video_driver, "d3d11") ||
string_is_equal(video_driver, "d3d12")
)
return true;
if (string_starts_with(video_driver, "gl"))
if (
string_is_equal(video_driver, "gl") ||
string_is_equal(video_driver, "gl1") ||
string_is_equal(video_driver, "glcore")
)
return true;
if (
string_is_equal(video_driver, "caca") ||
string_is_equal(video_driver, "gdi") ||
string_is_equal(video_driver, "gl") ||
string_is_equal(video_driver, "gl1") ||
string_is_equal(video_driver, "gx2") ||
string_is_equal(video_driver, "vulkan") ||
string_is_equal(video_driver, "glcore") ||
string_is_equal(video_driver, "metal") ||
string_is_equal(video_driver, "ctr") ||
string_is_equal(video_driver, "vita2d"))
string_is_equal(video_driver, "vita2d")
)
return true;
return false;

View File

@ -2197,7 +2197,6 @@ struct rarch_state
struct rarch_dir_list dir_shader_list;
#ifdef HAVE_MENU
/* Since these are static/global, they are initialised to zero */
menu_input_pointer_hw_state_t menu_input_pointer_hw_state;
menu_input_t menu_input_state;
#endif