-
Notifications
You must be signed in to change notification settings - Fork 72
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
One-Time Run: Default to per-game Proton version if --proton
is not passed
#1129
Conversation
a3fc3a2
to
b770067
Compare
We can probably get the RUNOTPROTON name from the path using the ProtonCSV. |
Fixed |
One-Time Run GUI still works as expected. Mismatch still works as expected on the UI as well. Tested using Proton Experimental on the UI which works. Also tested the mismatch resolution on the UI by manually setting an invalid Proton version on the config which displayed on the UI and then resolved correctly when launching the game. The GUI defaults to the Proton version set in the Per-Game Config ( Remaining work for this PR is to update the help screen to note that if |
… passed If per-game Proton 'USEPROTON' is empty, we resolve the mismatch using that instead of RUNOTPROTON. Also fixes an issue where One-Time Run did not correctly resolve Proton version mismatches if RUNOTPROTON was blank.
…re is a Proton mismatch
f04632a
to
885ac5a
Compare
This change has not been noted on the changelog because it pertains to commandline One-Time Run usage, which is is not available in a release. |
This PR allows for running One-Time Run without passing a Proton version. If the Proton version given is blank, or if
--proton=
is omitted entirely, we will fall back to the per-game Proton version, "USEPROTON
".If the per-game Proton version
USEPROTON
does not exist inProtonCSV.txt
(perhaps there have been Proton updates, or the game has not been launched in a long time and the value is a very old GE-Proton version) then we will resolve the mismatch using theUSEPROTON
.This PR also fixes an issue with commandline One-Time Run where blank values were not being resolved correctly, because
fixProtonVersionMismatch
does not run unlessISGAME -eq 2
, which is not guaranteed to be the case with One-Time Run if launched outside of Steam. Therefore, if we get far enough into thecommandlineOneTimeRun
function that we think we need to use Proton, we will forcefixProtonVersionMismatch
by passing a new argumentFORCEPROTONMISMATCHRESOLVE
which defaults to0
if not passed to preserve existing functionality.With that
fixProtonVersionMismatch
alone, it meant that it would've returned the first item in ProtonCSV if the mismatch version to resolve was blank (i.e. if--proton
was not passed), which is not ideal. Instead this PR has extra functionality to makefixProtonVersionMismatch
fall back to the per-game Proton version ifRUNOTPROTON
is blank (i.e. if--proton
is not passed).As a result, this PR means the following lines work:
steamtinkerlaunch otr --exe="/path/to/valid/exe"
- This previously would not have worked becausefixProtonVersionMismatch
would not have ran, so the EXE would not runfixProtonVersionMismatch
to return whatever the first Proton value is in ProtonCSVsteamtinkerlaunch otr --exe="/path/to/valid/exe" --proton="invalid-proton"
- This was previously meant to work by resolving withfixProtonVersionMismatch
, but this would have usually failed because the function was not running at all ifISGAME
was not3
. Now it will attempt to resolve the mismatch.There are some things left to do in this PR, mainly I want to check to see if
OTPROTON
needs to be updated after a Proton version mismatch. Logically it seems to me that it should, since it is only set to the value given by--proton=""
in the form ofRUNOTPROTON
, but as we can update this value to resolve mismatches if it is invalid, that meansOTPROTON
could be left being an invalid Proton version; that is, whateverRUNOTPROTON
was originally set to.TODO:
OTPROTON
and other saving behaviour needs updated afterRUNOTPROTON
gets updated for a Proton version mismatch resolution