diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 6bca3e9fe7..383c873710 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -549,9 +549,7 @@ static void mui_render_label_value(mui_handle_t *mui, } else { - enum menu_file_type entry_type = menu_hash_to_file_type(msg_hash_calculate(value)); - - switch (entry_type) + switch (msg_hash_to_file_type(msg_hash_calculate(value))) { case MENU_FILE_COMPRESSED: case MENU_FILE_MORE: diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index a0af73c67a..d82606cd12 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1698,9 +1698,7 @@ static void xmb_draw_items(xmb_handle_t *xmb, } else { - enum menu_file_type entry_type = menu_hash_to_file_type(msg_hash_calculate(entry.value)); - - switch (entry_type) + switch (msg_hash_to_file_type(msg_hash_calculate(entry.value))) { case MENU_FILE_COMPRESSED: case MENU_FILE_MORE: diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index f18061d755..744a656d70 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1789,7 +1789,7 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info) if (tmp_str_list->size > 1) strlcpy(elem1, tmp_str_list->elems[1].data, sizeof(elem1)); - switch (menu_hash_to_file_type(msg_hash_calculate(elem1))) + switch (msg_hash_to_file_type(msg_hash_calculate(elem1))) { case MENU_FILE_CRC: if (string_is_equal(crc_str, elem0)) diff --git a/menu/menu_shader.c b/menu/menu_shader.c index 3dfe43a0a9..76b2bae552 100644 --- a/menu/menu_shader.c +++ b/menu/menu_shader.c @@ -84,7 +84,7 @@ void menu_shader_manager_init(menu_handle_t *menu) sizeof(menu->default_slangp)); } - switch (menu_hash_to_file_type(msg_hash_calculate(path_get_extension(settings->path.shader)))) + switch (msg_hash_to_file_type(msg_hash_calculate(path_get_extension(settings->path.shader)))) { case MENU_FILE_SHADER_PRESET_GLSLP: case MENU_FILE_SHADER_PRESET_CGP: diff --git a/msg_hash.c b/msg_hash.c index c7a36c5b3b..b387a39b71 100644 --- a/msg_hash.c +++ b/msg_hash.c @@ -131,7 +131,7 @@ uint32_t msg_hash_calculate(const char *s) #define FILE_HASH_ZIP_UPP 0x0b883b78U #define FILE_HASH_APK 0x0b885e61U -enum menu_file_type menu_hash_to_file_type(uint32_t hash) +enum menu_file_type msg_hash_to_file_type(uint32_t hash) { switch (hash) { diff --git a/msg_hash.h b/msg_hash.h index d818d65aef..0542394966 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -2013,7 +2013,7 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len); int menu_hash_get_help(uint32_t hash, char *s, size_t len); -enum menu_file_type menu_hash_to_file_type(uint32_t hash); +enum menu_file_type msg_hash_to_file_type(uint32_t hash); uint32_t msg_hash_calculate(const char *s); diff --git a/retroarch.c b/retroarch.c index 0310c1bfab..accde97f6b 100644 --- a/retroarch.c +++ b/retroarch.c @@ -566,7 +566,7 @@ const char *retroarch_get_current_savefile_dir(void) enum rarch_content_type retroarch_path_is_media_type(const char *path) { - switch (menu_hash_to_file_type(msg_hash_calculate(path_get_extension(path)))) + switch (msg_hash_to_file_type(msg_hash_calculate(path_get_extension(path)))) { #ifdef HAVE_FFMPEG case MENU_FILE_OGM: diff --git a/tasks/task_decompress.c b/tasks/task_decompress.c index 117e8b2823..b5b324dcb9 100644 --- a/tasks/task_decompress.c +++ b/tasks/task_decompress.c @@ -260,7 +260,7 @@ bool task_push_decompress( /* ZIP or APK only */ if (!path_file_exists(source_file) || - menu_hash_to_file_type(msg_hash_calculate(path_get_extension(source_file))) + msg_hash_to_file_type(msg_hash_calculate(path_get_extension(source_file))) != MENU_FILE_COMPRESSED) { RARCH_WARN("[decompress] File '%s' does not exist or is not a compressed file.\n",