Skip to content

Commit

Permalink
Update steamtinkerlaunch
Browse files Browse the repository at this point in the history
fix check for steam game mode

and some scaling fixes for when in steam game mode
  • Loading branch information
zany130 committed Sep 21, 2024
1 parent fc43dba commit 9681162
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20240917-1-genericfy-steamdedeckt"
PROGVERS="v14.0.20240920-1-genericfy-steamdedeckt"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -4953,7 +4953,7 @@ function updateThisWinTemplate {
}

function updateWinRes {
if [ -z "$SAVESETSIZE" ] || [ "$ONSTEAMDECK" -eq 1 ]; then
if [ -z "$SAVESETSIZE" ] || [ "$FIXGAMESCOPE" -eq 1 ]; then
SAVESETSIZE=0
fi

Expand Down Expand Up @@ -10593,20 +10593,25 @@ function listScreenRes {

function setInitWinXY {
DEFRESSHM="$STLSHM/defres.txt"
SCRW="$(getScreenRes w)"
SCRH="$(getScreenRes h)"
if [ -f "$DEFRESSHM" ] ; then

loadCfg "$DEFRESSHM" X
writelog "INFO" "${FUNCNAME[0]} - Using '${WINX}x${WINY}' from config '$DEFRESSHM'"
else
if [ "$ONSTEAMDECK" -eq 1 ]; then
WINX="1280"
WINY="800"
else
SCRW="$(getScreenRes w)"
SCRH="$(getScreenRes h)"
WINX=$(( SCRW * 3 / 4))
WINY=$(( SCRH * 3 / 4))
if [ "$FIXGAMESCOPE" -eq 1 ];then
WINX="$SCRW"
WINY="$SCRH"
else
WINX=$(( SCRW * 3 / 4))
WINY=$(( SCRH * 3 / 4))
fi
fi

{
echo "WINX=\"$WINX\""
echo "WINY=\"$WINY\""
Expand Down Expand Up @@ -26622,7 +26627,7 @@ function installFilesSteamDeck {

function steamdedeckt {
# Differentiate between Steam Game Mode and Desktop Mode on Steam Deck
if grep -q "generate-drm-mode" <<< "$(pgrep -a "$GAMESCOPE")"; then
if grep -qi "steam" <<< "$(pgrep -a "$GAMESCOPE")"; then
writelog "INFO" "${FUNCNAME[0]} - Detected '$GAMESCOPE' running 'forced' - assuming we're running in Steam Game Mode"
FIXGAMESCOPE=1
else
Expand Down

0 comments on commit 9681162

Please sign in to comment.