Added reset mangohud settings if fps_only is used

This commit is contained in:
Boria138
2024-01-30 18:55:26 +06:00
parent f3bf1ef7cb
commit 480480e60f
2 changed files with 9 additions and 1 deletions

View File

@ -498,7 +498,7 @@ gui_MangoHud () {
LIST_MH=(
arch battery battery_icon battery_time battery_watt core_bars core_load
cpu_mhz cpu_power cpu_temp device_battery_icon engine_short_names
engine_version exec_name fcat fps_metrics fps_only frame_count full
engine_version exec_name fcat fps_metrics fps_only frame_count frametime full
gamemode gpu_core_clock gpu_fan gpu_junction_temp gpu_mem_clock
gpu_mem_temp gpu_name gpu_power gpu_temp gpu_voltage histogram horizontal
horizontal_stretch hud_compact hud_no_margin io_read io_write no_display
@ -593,6 +593,12 @@ gui_MangoHud () {
elif [[ "${FPS_LIMIT}" == "disabled" ]]
then export GUI_MH_RESULT="$(echo ${GUI_MH_RESULT} | sed "s/,fps_limit=${FPS_LIMIT_VAR}//" | sed "s/,fps_limit=disabled//")"
fi
if [[ "${GUI_MH_RESULT}" =~ "fps_only" ]]; then
export GUI_MH_RESULT="fps_only"
print_info "In the MangoHud config fps_only is detected all settings are reseted"
fi
export MANGOHUD_CONFIG="${GUI_MH_RESULT}"
edit_db_from_gui MANGOHUD_CONFIG PW_MANGOHUD FPS_LIMIT