mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-03 16:21:50 +00:00
runloop_check_shader_dir - cleanups
This commit is contained in:
parent
c9f047edd3
commit
9aa29d9fc5
@ -223,7 +223,7 @@ enum menu_file_type msg_hash_to_file_type(uint32_t hash)
|
||||
case MENU_VALUE_HLSL:
|
||||
return FILE_TYPE_SHADER_HLSL;
|
||||
case MENU_VALUE_CG:
|
||||
return FILE_TYPE_SHADER_HLSL;
|
||||
return FILE_TYPE_SHADER_CG;
|
||||
case MENU_VALUE_SLANG:
|
||||
return FILE_TYPE_SHADER_SLANG;
|
||||
case MENU_VALUE_GLSLP:
|
||||
@ -231,7 +231,7 @@ enum menu_file_type msg_hash_to_file_type(uint32_t hash)
|
||||
case MENU_VALUE_HLSLP:
|
||||
return FILE_TYPE_SHADER_PRESET_HLSLP;
|
||||
case MENU_VALUE_CGP:
|
||||
return FILE_TYPE_SHADER_PRESET_HLSLP;
|
||||
return FILE_TYPE_SHADER_PRESET_CGP;
|
||||
case MENU_VALUE_SLANGP:
|
||||
return FILE_TYPE_SHADER_PRESET_SLANGP;
|
||||
case MENU_VALUE_CRC:
|
||||
|
23
runloop.c
23
runloop.c
@ -77,13 +77,6 @@
|
||||
#define DEFAULT_EXT ""
|
||||
#endif
|
||||
|
||||
#define SHADER_EXT_GLSL 0x7c976537U
|
||||
#define SHADER_EXT_GLSLP 0x0f840c87U
|
||||
#define SHADER_EXT_CG 0x0059776fU
|
||||
#define SHADER_EXT_CGP 0x0b8865bfU
|
||||
#define SHADER_EXT_SLANG 0x105ce63aU
|
||||
#define SHADER_EXT_SLANGP 0x1bf9adeaU
|
||||
|
||||
#define runloop_cmd_triggered(cmd, id) BIT64_GET(cmd->state[2], id)
|
||||
|
||||
#define runloop_cmd_press(cmd, id) BIT64_GET(cmd->state[0], id)
|
||||
@ -504,7 +497,6 @@ static bool shader_dir_init(rarch_dir_list_t *dir_list)
|
||||
static void runloop_check_shader_dir(rarch_dir_list_t *dir_list,
|
||||
bool pressed_next, bool pressed_prev)
|
||||
{
|
||||
uint32_t ext_hash = 0;
|
||||
char msg[128] = {0};
|
||||
const char *shader = NULL;
|
||||
const char *ext = NULL;
|
||||
@ -530,20 +522,19 @@ static void runloop_check_shader_dir(rarch_dir_list_t *dir_list,
|
||||
|
||||
shader = dir_list->list->elems[dir_list->ptr].data;
|
||||
ext = path_get_extension(shader);
|
||||
ext_hash = msg_hash_calculate(ext);
|
||||
|
||||
switch (ext_hash)
|
||||
switch (msg_hash_to_file_type(msg_hash_calculate(ext)))
|
||||
{
|
||||
case SHADER_EXT_GLSL:
|
||||
case SHADER_EXT_GLSLP:
|
||||
case FILE_TYPE_SHADER_GLSL:
|
||||
case FILE_TYPE_SHADER_PRESET_GLSLP:
|
||||
type = RARCH_SHADER_GLSL;
|
||||
break;
|
||||
case SHADER_EXT_SLANG:
|
||||
case SHADER_EXT_SLANGP:
|
||||
case FILE_TYPE_SHADER_SLANG:
|
||||
case FILE_TYPE_SHADER_PRESET_SLANGP:
|
||||
type = RARCH_SHADER_SLANG;
|
||||
break;
|
||||
case SHADER_EXT_CG:
|
||||
case SHADER_EXT_CGP:
|
||||
case FILE_TYPE_SHADER_CG:
|
||||
case FILE_TYPE_SHADER_PRESET_CGP:
|
||||
type = RARCH_SHADER_CG;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user