mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-29 03:00:24 +00:00
Merge pull request #3759 from hizzlekizzle/master
add slang shader menu entry to online updater
This commit is contained in:
commit
ec86556ce6
@ -107,6 +107,8 @@ const char *file_path_str(enum file_path_enum enum_idx)
|
||||
return "http://mirror.lakka.tv/nightly";
|
||||
case FILE_PATH_SHADERS_GLSL_ZIP:
|
||||
return "shaders_glsl.zip";
|
||||
case FILE_PATH_SHADERS_SLANG_ZIP:
|
||||
return "shaders_slang.zip";
|
||||
case FILE_PATH_SHADERS_CG_ZIP:
|
||||
return "shaders_cg.zip";
|
||||
case FILE_PATH_DATABASE_RDB_ZIP:
|
||||
|
@ -2984,6 +2984,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "update_cg_shaders";
|
||||
case MENU_ENUM_LABEL_UPDATE_GLSL_SHADERS:
|
||||
return "update_glsl_shaders";
|
||||
case MENU_ENUM_LABEL_UPDATE_SLANG_SHADERS:
|
||||
return "update_slang_shaders";
|
||||
case MENU_ENUM_LABEL_SCREEN_RESOLUTION:
|
||||
return "screen_resolution";
|
||||
case MENU_ENUM_LABEL_USE_BUILTIN_IMAGE_VIEWER:
|
||||
@ -4289,6 +4291,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
return "Update Cg Shaders";
|
||||
case MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS:
|
||||
return "Update GLSL Shaders";
|
||||
case MENU_ENUM_LABEL_VALUE_UPDATE_SLANG_SHADERS:
|
||||
return "Update Slang Shaders";
|
||||
case MENU_ENUM_LABEL_VALUE_CORE_INFO_CORE_NAME:
|
||||
return "Core name";
|
||||
case MENU_ENUM_LABEL_VALUE_CORE_INFO_CORE_LABEL:
|
||||
@ -4421,6 +4425,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
return "Cg support";
|
||||
case MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_GLSL_SUPPORT:
|
||||
return "GLSL support";
|
||||
case MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_SLANG_SUPPORT:
|
||||
return "Slang support";
|
||||
case MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_HLSL_SUPPORT:
|
||||
return "HLSL support";
|
||||
case MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_LIBXML2_SUPPORT:
|
||||
|
@ -2228,11 +2228,16 @@ static void cb_generic_download(void *task_data,
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG:
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL:
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG:
|
||||
{
|
||||
static char shaderdir[PATH_MAX_LENGTH] = {0};
|
||||
const char *dirname =
|
||||
transf->enum_idx == MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG ?
|
||||
"shaders_cg" : "shaders_glsl";
|
||||
const char *dirname;
|
||||
if (transf->enum_idx == MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG)
|
||||
dirname = "shaders_cg";
|
||||
else if (transf->enum_idx == MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL)
|
||||
dirname = "shaders_glsl";
|
||||
else if (transf->enum_idx == MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG)
|
||||
dirname = "shaders_slang";
|
||||
|
||||
fill_pathname_join(shaderdir,
|
||||
settings->directory.video_shader,
|
||||
@ -2399,6 +2404,9 @@ static int action_ok_download_generic(const char *path,
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL:
|
||||
path = file_path_str(FILE_PATH_SHADERS_GLSL_ZIP);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG:
|
||||
path = file_path_str(FILE_PATH_SHADERS_SLANG_ZIP);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG:
|
||||
path = file_path_str(FILE_PATH_SHADERS_CG_ZIP);
|
||||
break;
|
||||
@ -2506,6 +2514,13 @@ static int action_ok_update_shaders_glsl(const char *path,
|
||||
MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL);
|
||||
}
|
||||
|
||||
static int action_ok_update_shaders_slang(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return action_ok_download_generic(path, label, NULL, type, idx, entry_idx,
|
||||
MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG);
|
||||
}
|
||||
|
||||
static int action_ok_update_databases(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -3809,6 +3824,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_UPDATE_CG_SHADERS:
|
||||
BIND_ACTION_OK(cbs, action_ok_update_shaders_cg);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_UPDATE_SLANG_SHADERS:
|
||||
BIND_ACTION_OK(cbs, action_ok_update_shaders_slang);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_UPDATE_CHEATS:
|
||||
BIND_ACTION_OK(cbs, action_ok_update_cheats);
|
||||
break;
|
||||
|
@ -2972,6 +2972,14 @@ static int menu_displaylist_parse_options(
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VULKAN
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UPDATE_SLANG_SHADERS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_UPDATE_SLANG_SHADERS),
|
||||
MENU_ENUM_LABEL_UPDATE_SLANG_SHADERS,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
@ -915,6 +915,7 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_UPDATE_CG_SHADERS,
|
||||
MENU_ENUM_LABEL_UPDATE_OVERLAYS,
|
||||
MENU_ENUM_LABEL_UPDATE_GLSL_SHADERS,
|
||||
MENU_ENUM_LABEL_UPDATE_SLANG_SHADERS,
|
||||
MENU_ENUM_LABEL_UPDATE_CORE_INFO_FILES,
|
||||
MENU_ENUM_LABEL_UPDATE_AUTOCONFIG_PROFILES_HID,
|
||||
|
||||
@ -928,6 +929,7 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_UPDATE_OVERLAYS,
|
||||
MENU_ENUM_LABEL_VALUE_UPDATE_CG_SHADERS,
|
||||
MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS,
|
||||
MENU_ENUM_LABEL_VALUE_UPDATE_SLANG_SHADERS,
|
||||
|
||||
MENU_ENUM_LABEL_INFORMATION,
|
||||
MENU_ENUM_LABEL_VALUE_INFORMATION,
|
||||
@ -1740,6 +1742,7 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DYLIB_SUPPORT,
|
||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_CG_SUPPORT,
|
||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_GLSL_SUPPORT,
|
||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_SLANG_SUPPORT,
|
||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_HLSL_SUPPORT,
|
||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_LIBXML2_SUPPORT,
|
||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_SDL_IMAGE_SUPPORT,
|
||||
@ -1842,6 +1845,7 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_CB_UPDATE_CHEATS,
|
||||
MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG,
|
||||
MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL,
|
||||
MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG,
|
||||
MENU_ENUM_LABEL_CB_UPDATE_ASSETS,
|
||||
MENU_ENUM_LABEL_CB_CORE_CONTENT_DOWNLOAD,
|
||||
MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES,
|
||||
|
Loading…
Reference in New Issue
Block a user