Commit 2b6812c2 authored by Boria138's avatar Boria138

Fixes xrand errors

parent 1b81250f
......@@ -2619,7 +2619,12 @@ pw_gui_for_edit_db () {
if [[ -z "$MANGOHUD_CONFIG" ]] ; then
MONITOR_HEIGHT="$(echo $PW_SCREEN_RESOLUTION | awk -F'x' '{print $2}')"
MH_FONT_SIZE="font_size=$(( MONITOR_HEIGHT / 45 ))"
MANGOHUD_CONFIG="$DEFAULT_MANGOHUD_CONFIG,$MH_FONT_SIZE"
if [[ ! -z "$MH_FONT_SIZE" ]]
then MANGOHUD_CONFIG="$DEFAULT_MANGOHUD_CONFIG,$MH_FONT_SIZE"
else MANGOHUD_CONFIG="$DEFAULT_MANGOHUD_CONFIG"
fi
edit_db_from_gui MANGOHUD_CONFIG
fi
edit_user_conf_from_gui PW_GPU_USE
......@@ -2909,7 +2914,6 @@ gui_MangoHud () {
show_fps_limit swap temp_fahrenheit throttling_status throttling_status_graph
time version vkbasalt vram vulkan_driver wine
)
# fps_only
unset ADD_GUI_MH GUI_MH_RESULT
......@@ -2990,7 +2994,7 @@ gui_MangoHud () {
((INT_COUNT_MH++))
done
if [[ -n "$MH_FONT_SIZE" ]]
if [[ ! -z "$MH_FONT_SIZE" ]]
then GUI_MH_RESULT="${GUI_MH_RESULT}${MH_FONT_SIZE}"
else GUI_MH_RESULT="${GUI_MH_RESULT%,}"
fi
......
......@@ -241,7 +241,6 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export PW_MH_exec_name_INFO='Отображать текущее имя исполняемого файла'
export PW_MH_fcat_INFO='Позволяет анализировать захват кадра'
export PW_MH_fps_metrics_INFO='Принимает список десятичных значений или значение avg, например avg,0,001'
export PW_MH_fps_only_INFO='Показывать только FPS. <b>Не предназначен для использования с другими параметрами</b>'
export PW_MH_frame_count_INFO='Показывать FPS'
export PW_MH_full_INFO='Включите большинство переключаемых параметров (в настоящее время исключается гистограмма)'
export PW_MH_gamemode_INFO='Отображает активность gamemode'
......@@ -656,7 +655,6 @@ elif [[ "${update_loc}" == "ENG" ]] ; then
export PW_MH_exec_name_INFO='Display current exec name'
export PW_MH_fcat_INFO='Enables frame capture analysis'
export PW_MH_fps_metrics_INFO='Takes a list of decimal values or the value avg, e.g avg,0.001'
export PW_MH_fps_only_INFO='Show FPS only. <b>Not meant to be used with other display params</b>'
export PW_MH_frame_count_INFO='Display frame count'
export PW_MH_full_INFO='Enable most of the toggleable parameters (currently excludes histogram)'
export PW_MH_gamemode_INFO='Show if GameMode is on'
......
......@@ -114,8 +114,14 @@ export LSPCI_VGA="$(lspci -k | grep -E 'VGA|3D' | tr -d '\n')"
if command -v xrandr &>/dev/null ; then
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_screen_configuration"
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep "primary" | awk '{print $1}')"
if [[ $(xrandr | grep "primary" | awk '{print $1}') ]] ; then
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep "primary" | awk '{print $1}')"
elif [[ $(xrandr | grep -w "connected" | awk '{print $1}') ]] ; then
# xrand not print primary on XFCE
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.* connected.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep -w "connected" | awk '{print $1}')"
fi
print_var PW_SCREEN_RESOLUTION PW_SCREEN_PRIMARY
else
print_error "xrandr - not found!"
......
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