Merge branch 'Boria138-xrandr-fix'
This commit is contained in:
commit
193c5b98e6
@ -2626,7 +2626,12 @@ pw_gui_for_edit_db () {
|
|||||||
if [[ -z "$MANGOHUD_CONFIG" ]] ; then
|
if [[ -z "$MANGOHUD_CONFIG" ]] ; then
|
||||||
MONITOR_HEIGHT="$(echo $PW_SCREEN_RESOLUTION | awk -F'x' '{print $2}')"
|
MONITOR_HEIGHT="$(echo $PW_SCREEN_RESOLUTION | awk -F'x' '{print $2}')"
|
||||||
MH_FONT_SIZE="font_size=$(( MONITOR_HEIGHT / 45 ))"
|
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
|
edit_db_from_gui MANGOHUD_CONFIG
|
||||||
fi
|
fi
|
||||||
edit_user_conf_from_gui PW_GPU_USE
|
edit_user_conf_from_gui PW_GPU_USE
|
||||||
@ -2916,7 +2921,6 @@ gui_MangoHud () {
|
|||||||
show_fps_limit swap temp_fahrenheit throttling_status throttling_status_graph
|
show_fps_limit swap temp_fahrenheit throttling_status throttling_status_graph
|
||||||
time version vkbasalt vram vulkan_driver wine
|
time version vkbasalt vram vulkan_driver wine
|
||||||
)
|
)
|
||||||
# fps_only
|
|
||||||
|
|
||||||
unset ADD_GUI_MH GUI_MH_RESULT
|
unset ADD_GUI_MH GUI_MH_RESULT
|
||||||
|
|
||||||
@ -2997,7 +3001,7 @@ gui_MangoHud () {
|
|||||||
((INT_COUNT_MH++))
|
((INT_COUNT_MH++))
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n "$MH_FONT_SIZE" ]]
|
if [[ ! -z "$MH_FONT_SIZE" ]]
|
||||||
then GUI_MH_RESULT="${GUI_MH_RESULT}${MH_FONT_SIZE}"
|
then GUI_MH_RESULT="${GUI_MH_RESULT}${MH_FONT_SIZE}"
|
||||||
else GUI_MH_RESULT="${GUI_MH_RESULT%,}"
|
else GUI_MH_RESULT="${GUI_MH_RESULT%,}"
|
||||||
fi
|
fi
|
||||||
|
@ -241,7 +241,6 @@ if [[ "${update_loc}" == "RUS" ]] ; then
|
|||||||
export PW_MH_exec_name_INFO='Отображать текущее имя исполняемого файла'
|
export PW_MH_exec_name_INFO='Отображать текущее имя исполняемого файла'
|
||||||
export PW_MH_fcat_INFO='Позволяет анализировать захват кадра'
|
export PW_MH_fcat_INFO='Позволяет анализировать захват кадра'
|
||||||
export PW_MH_fps_metrics_INFO='Принимает список десятичных значений или значение avg, например avg,0,001'
|
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_frame_count_INFO='Показывать FPS'
|
||||||
export PW_MH_full_INFO='Включите большинство переключаемых параметров (в настоящее время исключается гистограмма)'
|
export PW_MH_full_INFO='Включите большинство переключаемых параметров (в настоящее время исключается гистограмма)'
|
||||||
export PW_MH_gamemode_INFO='Отображает активность gamemode'
|
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_exec_name_INFO='Display current exec name'
|
||||||
export PW_MH_fcat_INFO='Enables frame capture analysis'
|
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_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_frame_count_INFO='Display frame count'
|
||||||
export PW_MH_full_INFO='Enable most of the toggleable parameters (currently excludes histogram)'
|
export PW_MH_full_INFO='Enable most of the toggleable parameters (currently excludes histogram)'
|
||||||
export PW_MH_gamemode_INFO='Show if GameMode is on'
|
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
|
if command -v xrandr &>/dev/null ; then
|
||||||
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_screen_configuration"
|
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')"
|
if [[ $(xrandr | grep "primary" | awk '{print $1}') ]] ; then
|
||||||
export PW_SCREEN_PRIMARY="$(xrandr | grep "primary" | awk '{print $1}')"
|
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
|
print_var PW_SCREEN_RESOLUTION PW_SCREEN_PRIMARY
|
||||||
else
|
else
|
||||||
print_error "xrandr - not found!"
|
print_error "xrandr - not found!"
|
||||||
|
Loading…
Reference in New Issue
Block a user