diff --git a/scriptmodules/supplementary/runcommand/runcommand.sh b/scriptmodules/supplementary/runcommand/runcommand.sh index 3d19d89659..3d9fe45d13 100755 --- a/scriptmodules/supplementary/runcommand/runcommand.sh +++ b/scriptmodules/supplementary/runcommand/runcommand.sh @@ -701,6 +701,7 @@ function main_menu() { ;; L) COMMAND+=" --verbose" + VERBOSE=1 return 0 ;; U) @@ -1101,6 +1102,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 is on, set core logging to INFO + [[ "$VERBOSE" -eq 1 ]] && iniSet "libretro_log_level" "1" + # if the ROM has a custom configuration then append that too if [[ -f "$ROM.cfg" ]]; then conf+="'|'\"$ROM.cfg\""