Added screensaver inhibit on Game Running

parent 0483902b
...@@ -2925,7 +2925,7 @@ start_portwine () { ...@@ -2925,7 +2925,7 @@ start_portwine () {
elif [[ "$PW_USE_GAMEMODE" = "1" ]] \ elif [[ "$PW_USE_GAMEMODE" = "1" ]] \
&& [[ -n "$DBUS_SESSION_BUS_ADDRESS" ]] && [[ -n "$DBUS_SESSION_BUS_ADDRESS" ]]
then then
if command -v systemctl \ if command -v systemctl &>/dev/null \
&& (systemctl is-active --quiet ananicy.service \ && (systemctl is-active --quiet ananicy.service \
|| systemctl is-active --quiet ananicy-cpp.service) || systemctl is-active --quiet ananicy-cpp.service)
then then
...@@ -2973,6 +2973,11 @@ start_portwine () { ...@@ -2973,6 +2973,11 @@ start_portwine () {
export GAMEMODERUN=0 export GAMEMODERUN=0
export PW_GAMEMODERUN_SLR="" export PW_GAMEMODERUN_SLR=""
fi fi
if command -v systemd-inhibit &>/dev/null && [[ "$GAMEMODERUN" != "1" ]] ; then
PW_INHIBIT_SLR='systemd-inhibit --mode=block --who="PortProton" --why="Running"'
print_info "Screensaver will be inhibit"
fi
pw_other_fixes pw_other_fixes
# enabled BattleEye_Runtime and EasyAntiCheat_Runtime # enabled BattleEye_Runtime and EasyAntiCheat_Runtime
...@@ -3793,6 +3798,7 @@ pw_run () { ...@@ -3793,6 +3798,7 @@ pw_run () {
print_info "Log from RUNTIME and WINE:" print_info "Log from RUNTIME and WINE:"
${PW_RUN_GAMESCOPE} \ ${PW_RUN_GAMESCOPE} \
${PW_POWERPROFILECTL_SLR} \ ${PW_POWERPROFILECTL_SLR} \
${PW_INHIBIT_SLR} \
${pw_runtime} \ ${pw_runtime} \
LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \ LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
LD_PRELOAD="${PW_LD_PRELOAD}" \ LD_PRELOAD="${PW_LD_PRELOAD}" \
...@@ -3811,6 +3817,7 @@ pw_run () { ...@@ -3811,6 +3817,7 @@ pw_run () {
echo "Log WINE:" > "${PW_LOG_TO_FILE}" echo "Log WINE:" > "${PW_LOG_TO_FILE}"
${PW_RUN_GAMESCOPE} \ ${PW_RUN_GAMESCOPE} \
${PW_POWERPROFILECTL_SLR} \ ${PW_POWERPROFILECTL_SLR} \
${PW_INHIBIT_SLR} \
${pw_runtime} \ ${pw_runtime} \
LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \ LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" \
LD_PRELOAD="${PW_LD_PRELOAD}" \ LD_PRELOAD="${PW_LD_PRELOAD}" \
...@@ -3846,6 +3853,7 @@ pw_run () { ...@@ -3846,6 +3853,7 @@ pw_run () {
${PW_POWERPROFILECTL_SLR} \ ${PW_POWERPROFILECTL_SLR} \
${PW_MANGOHUD_SLR} \ ${PW_MANGOHUD_SLR} \
${PW_DISPLAY} \ ${PW_DISPLAY} \
${PW_INHIBIT_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}" "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
wait_wineserver wait_wineserver
else else
...@@ -3864,6 +3872,7 @@ pw_run () { ...@@ -3864,6 +3872,7 @@ pw_run () {
${PW_POWERPROFILECTL_SLR} \ ${PW_POWERPROFILECTL_SLR} \
${PW_MANGOHUD_SLR} \ ${PW_MANGOHUD_SLR} \
${PW_DISPLAY} \ ${PW_DISPLAY} \
${PW_INHIBIT_SLR} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]}
wait_wineserver wait_wineserver
fi fi
......
...@@ -15,7 +15,7 @@ export PW_RT_MOUNT_RO=("") ...@@ -15,7 +15,7 @@ export PW_RT_MOUNT_RO=("")
export PW_RT_MOUNT_RW=("/media" "/mnt" "/run/media/${USER}" "${PORT_WINE_PATH}") export PW_RT_MOUNT_RW=("/media" "/mnt" "/run/media/${USER}" "${PORT_WINE_PATH}")
#export PW_SANDBOX_HOME_PATH="${PORT_WINE_PATH}" #export PW_SANDBOX_HOME_PATH="${PORT_WINE_PATH}"
export PW_NO_ESYNC="0" export PW_NO_ESYNC="0"
export PW_USE_GAMEMODE="1" export PW_USE_GAMEMODE="0"
export PW_FORCE_USE_VSYNC="2" export PW_FORCE_USE_VSYNC="2"
export PW_USE_TERMINAL="0" export PW_USE_TERMINAL="0"
export PW_WINDOWS_VER="10" export PW_WINDOWS_VER="10"
......
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