Commit a852f48d authored by Boria138's avatar Boria138

Brought fps limitation to the same form as CPU cores limitation

Changed yad scale to yad combobox with values 30,60,90 and 120 fps also changed disable from 0 to disabled
parent 95b9627c
......@@ -233,7 +233,7 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export loc_gui_arg_exe="Добавить аргумент после <b>.exe</b> файла"
export loc_gui_arg_exe_help="Добавление аргумента после <b>.exe</b> файла, так же как если бы вы добавили аргумент в ярлыке в системе <b>WINDOWS </b>"
export loc_gui_mango_fps="Ограничить FPS (0 - выключено)"
export loc_gui_mango_fps="Ограничить FPS"
export loc_gui_mango_fps_help="Включение ограничения количества кадров в секунду средстами MANGOHUD встроенного в PortProton."
export loc_gui_cpu_limit="Ограничить использование ядер процессора"
......@@ -484,7 +484,7 @@ A brief instruction:
export loc_gui_arg_exe="ADD ARGUMENTS FOR .EXE FILE"
export loc_gui_arg_exe_help="Adding an argument after the <b>.exe</b> file, just like you would add an argument in a shortcut on a <b>WINDOWS </b> system"
export loc_gui_mango_fps="MANGOHUD FPS LIMIT (0-disabled)"
export loc_gui_mango_fps="MANGOHUD FPS LIMIT"
export loc_gui_mango_fps_help="Enabling FPS limits using MANGOHUD built into ${portname}"
export loc_gui_cpu_limit="Limit the use of processor cores"
......
......@@ -153,7 +153,7 @@ pw_gui_for_edit_db () {
if echo "${MANGOHUD_CONFIG}" | grep "fps_limit" ; then
FPS_LIMIT_VAR="$(echo ${MANGOHUD_CONFIG} | sed 's/.*fps_limit=//' | awk -F, '{print $1}')"
else
FPS_LIMIT_VAR=0
FPS_LIMIT_VAR="disabled"
fi
if [[ -n "${PW_WINE_CPU_TOPOLOGY}" ]] && [[ "${PW_WINE_CPU_TOPOLOGY}" != "disabled" ]] ; then
......@@ -201,7 +201,7 @@ pw_gui_for_edit_db () {
--field="${loc_gui_arg_exe}!${loc_gui_arg_exe_help} :CBE" "\\${LAUNCH_PARAMETERS[@]}!-dx11 -skipintro 1" \
--field=":LBL" "" \
--field="${loc_gui_cpu_limit}!${loc_gui_cpu_limit_help} :CB" "${CPU_LIMIT_VAR}!disabled!${GET_LOGICAL_CORE}" \
--field="${loc_gui_mango_fps}!${loc_gui_mango_fps_help} :SCL" ${FPS_LIMIT_VAR} 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" 2>/dev/null &
--field="${loc_gui_mango_fps}!${loc_gui_mango_fps_help} :CB" "${FPS_LIMIT_VAR}!disabled!30!60!90!120" 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" 2>/dev/null &
"${pw_yad_v12_3}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="650" \
--text "${loc_gui_edit_db} <b>${PORTWINE_DB}</b>\n ${loc_gui_edit_db_help}" --separator=" " --borders=3 \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
......@@ -234,13 +234,13 @@ pw_gui_for_edit_db () {
CPU_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $7}'`"
FPS_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $8}'`"
if [[ "${FPS_LIMIT}" != 0 ]] && [[ "${FPS_LIMIT_VAR}" != 0 ]] ; then
if [[ "${FPS_LIMIT}" != "disabled" ]] && [[ "${FPS_LIMIT_VAR}" != "disabled" ]] ; then
export MANGOHUD_CONFIG="$(echo ${MANGOHUD_CONFIG} | sed "s/fps_limit=${FPS_LIMIT_VAR}/fps_limit=${FPS_LIMIT}/")"
export PW_MANGOHUD=1
elif [[ "${FPS_LIMIT}" != 0 ]] && [[ "${FPS_LIMIT_VAR}" == 0 ]] ; then
elif [[ "${FPS_LIMIT}" != "disabled" ]] && [[ "${FPS_LIMIT_VAR}" == "disabled" ]] ; then
export MANGOHUD_CONFIG=${MANGOHUD_CONFIG},fps_limit=${FPS_LIMIT}
export PW_MANGOHUD=1
elif [[ "${FPS_LIMIT}" == 0 ]] && [[ "${FPS_LIMIT_VAR}" != 0 ]] ; then
elif [[ "${FPS_LIMIT}" == "disabled" ]] && [[ "${FPS_LIMIT_VAR}" != "disabled" ]] ; then
export MANGOHUD_CONFIG="$(echo ${MANGOHUD_CONFIG} | sed "s/,fps_limit=${FPS_LIMIT_VAR}//")"
fi
if [[ "${CPU_LIMIT}" != "disabled" ]] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment