From 555c5c59747ddbecc17762dec137afad4ad983fd Mon Sep 17 00:00:00 2001 From: Boria138 Date: Sat, 9 Dec 2023 14:39:38 +0600 Subject: [PATCH] Ported from SteamOS fixes for gamescope and some games in PortProton --- data_from_portwine/scripts/functions_helper | 22 ++++++++++++++++----- data_from_portwine/scripts/runlib | 3 ++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 5f1d76b0..273430bf 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -898,12 +898,24 @@ pw_init_db () { if [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && [[ ! -z "${WINE_CPU_TOPOLOGY}" ]] ; then export PW_WINE_CPU_TOPOLOGY="${WINE_CPU_TOPOLOGY}" fi - if ls "${PATH_TO_GAME}"/*_Data/Resources/ 2>/dev/null | grep "unity" &>/dev/null \ - && [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] \ - && [[ $(grep -c "^processor" /proc/cpuinfo) -gt "8" ]] + if ls "${PATH_TO_GAME}"/*_Data/Resources/ 2>/dev/null | grep "unity" &>/dev/null && \ + [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && \ + [[ $(grep -c "^processor" /proc/cpuinfo) -gt "8" ]] then - export PW_WINE_CPU_TOPOLOGY="8:0,1,2,3,4,5,6,7" - print_info "Automatic added fix for unity games: WINE_CPU_TOPOLOGY=8:0,1,2,3,4,5,6,7" + export PW_WINE_CPU_TOPOLOGY="8:0,1,2,3,4,5,6,7" + print_info "Automatic fix added for Unity games: WINE_CPU_TOPOLOGY=8:0,1,2,3,4,5,6,7" + elif "${portwine_exe}" | grep "Cyberpunk" && \ + [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && \ + [[ $(grep -c "^processor" /proc/cpuinfo) -gt "8" ]] + then + export PW_WINE_CPU_TOPOLOGY="8:0,1,2,3,4,5,6,7" + print_info "Automatic fix added for Cyberpunk 2077: WINE_CPU_TOPOLOGY=8:0,1,2,3,4,5,6,7" + elif "${portwine_exe}" | grep "HorizonZeroDawn" && \ + [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && \ + [[ $(grep -c "^processor" /proc/cpuinfo) -gt "8" ]] + then + export PW_WINE_CPU_TOPOLOGY="8:0,1,2,3,4,5,6,7" + print_info "Automatic fix added for Horizon Zero Dawn: WINE_CPU_TOPOLOGY=8:0,1,2,3,4,5,6,7" fi if check_nvidia_rtx ; then diff --git a/data_from_portwine/scripts/runlib b/data_from_portwine/scripts/runlib index 7e2c5938..ee9252d2 100755 --- a/data_from_portwine/scripts/runlib +++ b/data_from_portwine/scripts/runlib @@ -128,9 +128,10 @@ start_portwine () { fi export PW_RUN_GAMESCOPE="gamescope -o 30 ${PW_ID_VIDEO} ${GAMESCOPE_ARGS} --" export PW_WINE_FULLSCREEN_FSR=0 + export vk_xwayland_wait_ready=false else export PW_USE_GAMESCOPE=0 - unset PW_RUN_GAMESCOPE INTEL_DEBUG + unset PW_RUN_GAMESCOPE INTEL_DEBUG vk_xwayland_wait_ready fi enabled_fake_nvidia_videocard ()