Fixed gamemode and update prime render offload

This commit is contained in:
Boria138 2023-11-08 00:07:31 +06:00
parent 4bb0682035
commit dca84f2625
2 changed files with 4 additions and 5 deletions

@ -159,8 +159,7 @@ start_portwine () {
fi fi
if [[ "${PW_PRIME_RENDER_OFFLOAD}" == 1 ]] ; then if [[ "${PW_PRIME_RENDER_OFFLOAD}" == 1 ]] ; then
if [[ ! -z $(command -v glxinfo) ]] \ if ${PW_WINELIB}/portable/bin/inxi -Gc0 | grep "renderer" | grep -i "nvidia" ;
&& [[ ! -z $(glxinfo -B | grep "OpenGL renderer" | grep -i "nvidia") ]]
then then
print_debug "Nvidia used by default. Force disabled PRIME_RENDER_OFFLOAD" print_debug "Nvidia used by default. Force disabled PRIME_RENDER_OFFLOAD"
export __NV_PRIME_RENDER_OFFLOAD=0 export __NV_PRIME_RENDER_OFFLOAD=0
@ -220,7 +219,7 @@ start_portwine () {
print_info "Gamemod will be launched." print_info "Gamemod will be launched."
else else
export GAMEMODERUN=0 export GAMEMODERUN=0
echo "Gamemod is not installed or disabled in vars script or db file: PW_USE_GAMEMODE=$PW_USE_GAMEMODE" print_info "Gamemod is not installed or disabled in vars script or db file: PW_USE_GAMEMODE=$PW_USE_GAMEMODE"
fi fi
pw_other_fixes pw_other_fixes

@ -180,10 +180,10 @@ portwine_start_debug () {
fi fi
echo "----------------------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log" echo "----------------------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "GameMode status:" >> "${PORT_WINE_PATH}/${portname}.log" echo "GameMode status:" >> "${PORT_WINE_PATH}/${portname}.log"
if gamemoded -s | grep -q "active"; if gamemoded -s | grep "is active";
then then
echo "gamemode is active" >> "${PORT_WINE_PATH}/${portname}.log" echo "gamemode is active" >> "${PORT_WINE_PATH}/${portname}.log"
elif gamemoded -s | grep -q "inactive"; elif gamemoded -s | grep "is inactive";
then then
echo "gamemode is inactive" >> "${PORT_WINE_PATH}/${portname}.log" echo "gamemode is inactive" >> "${PORT_WINE_PATH}/${portname}.log"
else else