mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Build up supported shader passes/presets dynamically
This commit is contained in:
parent
64d8689a57
commit
3f74927225
@ -5554,14 +5554,46 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_SHADER_PRESET:
|
case DISPLAYLIST_SHADER_PRESET:
|
||||||
menu_displaylist_reset_filebrowser();
|
{
|
||||||
info->type_default = FILE_TYPE_SHADER_PRESET;
|
union string_list_elem_attr attr = {0};
|
||||||
strlcpy(info->exts, "cgp|glslp|slangp", sizeof(info->exts));
|
struct string_list *str_list = string_list_new();
|
||||||
|
|
||||||
|
menu_displaylist_reset_filebrowser();
|
||||||
|
info->type_default = FILE_TYPE_SHADER_PRESET;
|
||||||
|
|
||||||
|
#ifdef HAVE_CG
|
||||||
|
string_list_append(str_list, "cgp", attr);
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GLSL
|
||||||
|
string_list_append(str_list, "glslp", attr);
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_VULKAN
|
||||||
|
string_list_append(str_list, "slangp", attr);
|
||||||
|
#endif
|
||||||
|
string_list_join_concat(info->exts, sizeof(info->exts), str_list, "|");
|
||||||
|
string_list_free(str_list);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_SHADER_PASS:
|
case DISPLAYLIST_SHADER_PASS:
|
||||||
menu_displaylist_reset_filebrowser();
|
{
|
||||||
info->type_default = FILE_TYPE_SHADER;
|
union string_list_elem_attr attr = {0};
|
||||||
strlcpy(info->exts, "cg|glsl|slang", sizeof(info->exts));
|
struct string_list *str_list = string_list_new();
|
||||||
|
|
||||||
|
menu_displaylist_reset_filebrowser();
|
||||||
|
info->type_default = FILE_TYPE_SHADER;
|
||||||
|
|
||||||
|
#ifdef HAVE_CG
|
||||||
|
string_list_append(str_list, "cg", attr);
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GLSL
|
||||||
|
string_list_append(str_list, "glsl", attr);
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_VULKAN
|
||||||
|
string_list_append(str_list, "slang", attr);
|
||||||
|
#endif
|
||||||
|
string_list_join_concat(info->exts, sizeof(info->exts), str_list, "|");
|
||||||
|
string_list_free(str_list);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_VIDEO_FILTERS:
|
case DISPLAYLIST_VIDEO_FILTERS:
|
||||||
menu_displaylist_reset_filebrowser();
|
menu_displaylist_reset_filebrowser();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user