Fix runahead settings.

This commit is contained in:
fewtarius 2023-10-28 11:45:35 +00:00
parent afa09c0419
commit fbaa4e1754
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -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
}