Skip to content

Commit

Permalink
Fix CLI shader loading
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Dec 26, 2024
1 parent 5749a21 commit 95f0297
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions gfx/video_shader_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2890,19 +2890,13 @@ static bool video_shader_load_shader_preset_internal(
* only important for video drivers with multiple shader backends */
RARCH_SHADER_GLSL, RARCH_SHADER_SLANG, RARCH_SHADER_CG, RARCH_SHADER_HLSL
};
static enum display_flags types_flags[] =
{
/* Shader preset priority, highest to lowest
* only important for video drivers with multiple shader backends */
GFX_CTX_FLAGS_SHADERS_GLSL, GFX_CTX_FLAGS_SHADERS_SLANG, GFX_CTX_FLAGS_SHADERS_CG, GFX_CTX_FLAGS_SHADERS_HLSL
};

flags.flags = 0;
video_context_driver_get_flags(&flags);

for (i = 0; i < (int)ARRAY_SIZE(types); i++)
{
if (!BIT32_GET(flags.flags, types_flags[i]))
if (!BIT32_GET(flags.flags, video_shader_type_to_flag(types[i])))
continue;

/* Concatenate strings into full paths */
Expand Down Expand Up @@ -3226,7 +3220,7 @@ const char *video_shader_get_current_shader_preset(void)
video_st->flags &= ~VIDEO_FLAG_SHADER_PRESETS_NEED_RELOAD;

if (BIT32_GET(flags.flags,
video_shader_parse_type(video_st->cli_shader_path)))
video_shader_type_to_flag(video_shader_parse_type(video_st->cli_shader_path))))
strlcpy(runloop_st->runtime_shader_preset_path,
video_st->cli_shader_path,
sizeof(runloop_st->runtime_shader_preset_path));
Expand Down

0 comments on commit 95f0297

Please sign in to comment.