-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove CompatTool add from setflatpak function #1152
Conversation
It shouldn't be necessary due to how the Flatpak STL is, and at this point in the setup `$SROOT` doesn't seem to have been set anyway
Whoops, forgot to make a branch and now posted 2 commits. Well, the second one is a fix for gamescope -W/-H. Wrong case in the grep, so if it wasn't set the dropdown would end up as just an "x" instead of a resolution. |
Thanks! The Flatpak changes make sense.
This is why looking at a diff on a phone screen is a bad idea :-) I see now. Our check for if the line exists in the arguments is out, we're looking for lowercase |
The first one is meant to be detecting upper case W and H and the second one below is meant to be detecting lower case w and h. Currently both lines are identical. The top one is in the wrong case and the commit fixes that. |
Updated my comment, sorry for the sillness 👍 This GameScope fix will allow us to properly parse the ShellCheck is failing because If you can remove it (or comment it out, if you think it could be used in future), and bump the version ( |
Hmm, testing the change locally, it doesn't seem to fix the issue. Leaving the "Game internal resolution" blank still results in the dropdown showing Not sure what's up with that yet, but your commit doesn't make the issue worse at least so we can leave it in and I can dig further into it separately to this PR. |
Oh, when I tested it it worked... then again I only left one blank x.x |
Thanks! I have merged the changes 😄 Changes look good overall though, and thank you for bringing this issue to my attention! If it's something you want to continue looking at please feel free to, otherwise I can dig into it (I have some other GameScope flags I want to add soon). I really appreciate the work here to investigate issues, clarify the Flatpak + GameScope issue, and to notify me of the PID issue. |
Okay, so the GameScope problem is a little tricky, but I think I have a solution. The problem is that we currently only check if the We check these as a pair to make sure they exist, so that if one is missing, we invalidate the other, so that we don't end up setting the width but not the height. We could theoretically change this, GameScope itself will accept simply Basically, the current check just makes sure the width and height flags are set, and if they aren't, we default to But if on the UI we make these fields blank, we still save the The core problem lies with # This will return `-h`
GAMESCOPE_ARGS="-w -h"
tr ' ' '\n' <<< "$GAMESCOPE_ARGS" | grep -wA1 "\-w" | tail -n1) The reason this returns
The fix is to check if we have a value for Something like the following does work, but it's a bit ugly. # GameScope Show Resolution (corresponds to -W, -H options, uppercase) -- Actual GameScope window size -- Dropdown
if [ -z "$GSSHWRES" ]; then
if ! grep -qw "\-W" <<< "$GAMESCOPE_ARGS" || ! grep -qw "\-H" <<< "$GAMESCOPE_ARGS"; then
GSSHWRES="1280x720"
else
# TODO these should be
GSARGSHOWWIDTH="$( tr ' ' '\n' <<< "$GAMESCOPE_ARGS" | grep -wA1 "\-W" | tail -n1 | grep "^[0-9]\+$" )"
GSARGSHOWHEIGHT="$(tr ' ' '\n' <<< "$GAMESCOPE_ARGS" | grep -wA1 "\-H" | tail -n1 | grep "^[0-9]\+$" )"
if [ -z "${GSARGSHOWWIDTH}" ] || [ "${GSARGSHOWHEIGHT}" ]; then
GSSHWRES="1280x720"
else
GSSHWRES="${GSARGSHOWWIDTH}x${GSARGSHOWHEIGHT}"
fi
fi
fi We could clean it up a bit and just make this a function and re-use it for EDIT: It seems like we can use |
Came up with a potential fix for The resolution boxes are special cases, because they are comboboxes that represent two GameScope flags. Most Yad So the refactor changes shouldn't affect other numeric values, but I will need to test to make sure it doesn't impact other comboboxes just to be safe. I'll also probably do a full pass on the GameScope flow to make sure nothing has broken, as |
PR to fix the GameScope resolution boxes returning ' |
Forgot to mention, I gave you credit for this fix on the changelog under "Fixes" :-) https://github.com/sonic2kk/steamtinkerlaunch/wiki/Changelog |
It isn't necessary due to how the Flatpak STL works, and at this point in the setup
$SROOT
doesn't seem to have been set anyway, so it fails.