diff --git a/scriptmodules/supplementary/runcommand/runcommand.sh b/scriptmodules/supplementary/runcommand/runcommand.sh index 3d19d89659..115e61cd07 100755 --- a/scriptmodules/supplementary/runcommand/runcommand.sh +++ b/scriptmodules/supplementary/runcommand/runcommand.sh @@ -1101,6 +1101,14 @@ function retroarch_append_config() { iniSet "video_fullscreen_y" "${dim[1]}" fi + # set `libretro_directory` to the core parent folder + local core_dir=$(echo "$COMMAND" | grep -Eo " $ROOTDIR/libretrocores/.*libretro\.so " | head -n 1) + core_dir=$(dirname "$core_dir") + [[ -n "$core_dir" ]] && iniSet "libretro_directory" "$core_dir" + + # if verbose logging s on, set the libretro core logging to INFO + [[ $COMMAND =~ "--verbose" ]] && iniSet "libretro_log_level" "1" + # if the ROM has a custom configuration then append that too if [[ -f "$ROM.cfg" ]]; then conf+="'|'\"$ROM.cfg\""