Commit d6f35c00 authored by Boria138's avatar Boria138

Added automatic MangoHud font size configuration

parent 0bca933f
......@@ -567,6 +567,11 @@ gui_MangoHud() {
YAD_MH_SET=$(<"${PORT_WINE_TMP_PATH}/tmp_yad_mh_set")
FPS_LIMIT=$(<"${PORT_WINE_TMP_PATH}/tmp_yad_mh_fps_limit")
if command -v xrand 2>/dev/null; then
MONITOR_HEIGHT=$(xrandr | grep -oP 'current\s+\K[0-9]+ x [0-9]+' | awk '{print $3}')
MH_FONT_SIZE="font_size=$(expr $MONITOR_HEIGHT / 45)"
fi
INT_COUNT_FX=0
for read_list_mh in ${YAD_MH_SET}; do
if [[ "$read_list_mh" == "TRUE" ]]; then
......@@ -575,7 +580,11 @@ gui_MangoHud() {
export INT_COUNT_FX=$((INT_COUNT_FX + 1))
done
if [ -n "$MH_FONT_SIZE" ]; then
GUI_MH_RESULT="${GUI_MH_RESULT}${MH_FONT_SIZE}"
else
GUI_MH_RESULT="${GUI_MH_RESULT%,}"
fi
if [[ "${FPS_LIMIT}" != "disabled" ]] ; then
export GUI_MH_RESULT=${GUI_MH_RESULT},fps_limit=${FPS_LIMIT}
......
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