You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in the path_relative_to function that makes saving shader presets store the wrong path in the preset file.
The issue happens when the shader preset loaded in RetroArch has
the filename starting with p
location in $HOME/.config/retroarch/shaders
When trying to save the shader preset (per-game or per-core, but I don't think it matters), RetroArch tries to save a relative path to the loaded preset and invokes path_relative_to to get a relative path to the loaded shader.
However, path_relative_to will produce a wrong result because it strips the p from both presets and the shader preset name, resulting in a wrong relative path.
Description
There is a bug in the
path_relative_to
function that makes saving shader presets store the wrong path in the preset file.The issue happens when the shader preset loaded in RetroArch has
$HOME/.config/retroarch/shaders
When trying to save the shader preset (per-game or per-core, but I don't think it matters), RetroArch tries to save a relative path to the loaded preset and invokes
path_relative_to
to get a relative path to the loaded shader.RetroArch/gfx/video_shader_parse.c
Line 632 in 7175c3e
However,
path_relative_to
will produce a wrong result because it strips the p from both presets and the shader preset name, resulting in a wrong relative path.RetroArch/libretro-common/file/file_path.c
Lines 908 to 917 in ae7d956
Expected behavior
Shader preset should contain the correct relative path.
Actual behavior
Shader preset saves the wrong relative path to the actual shader.
Steps to reproduce the bug
Copy
phosphorglut.glslp
(and the necessary pre-requisites) to$HOME/.config/retroarch/shaders
.Start RetroArch and load the shader.
Try to save the a Game or Core preset. The game/core preset file is created, but RetroArch fails to re-load the shader and disables the shader.
The preset file created by save has the wrong path and contains
instead of containing
Bisect Results
Not sure if it
path_relative_to
was working properly before, but the shader preset was overhauled in #9315.Version/Commit
You can find this information under Information/System Information
Environment information
The text was updated successfully, but these errors were encountered: