From fbaa4e1754a2a4ccea8e76c0959a7f379743242b Mon Sep 17 00:00:00 2001 From: fewtarius Date: Sat, 28 Oct 2023 11:45:35 +0000 Subject: [PATCH] Fix runahead settings. --- packages/jelos/sources/scripts/setsettings.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/jelos/sources/scripts/setsettings.sh b/packages/jelos/sources/scripts/setsettings.sh index f1e91c067..531aa8324 100755 --- a/packages/jelos/sources/scripts/setsettings.sh +++ b/packages/jelos/sources/scripts/setsettings.sh @@ -758,14 +758,20 @@ function set_runahead() { local RUNAHEAD="$(game_setting runahead)" local HAS_RUNAHEAD="$(match ${PLATFORM} ${NO_RUNAHEAD[@]})" case ${HAS_RUNAHEAD} in - 0|false|none) + 1) add_setting "none" "run_ahead_enabled" "false" - add_setting "none" "run_ahead_frames" "1" + add_setting "none" "run_ahead_frames" "0" ;; *) - add_setting "none" "run_ahead_enabled" "true" - add_setting "none" "run_ahead_frames" "${RUNAHEAD}" - add_setting "secondinstance" "run_ahead_secondary_instance" + if [ "${RUNAHEAD}" -gt 0 ] + then + add_setting "none" "run_ahead_enabled" "true" + add_setting "none" "run_ahead_frames" "${RUNAHEAD}" + add_setting "secondinstance" "run_ahead_secondary_instance" + else + add_setting "none" "run_ahead_enabled" "false" + add_setting "none" "run_ahead_frames" "0" + fi ;; esac }