Closed sonic2kk closed 1 week ago
OTPROTON
does need updated. It is blank if --proton
is not given, and is incorrect if there is a mismatch resolution. It is set to the Proton name and not the path unlike RUNOTPROTON
, so we need a way to get the RUNOTPROTON
name and assign it to OTPROTON
after we have confirmed a valid Proton version.
We can probably get the RUNOTPROTON name from the path using the ProtonCSV.
Fixed OTPROTON
issue. Now I need to verify that the UI still works fine with the selected Proton version.
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 (USEPROTON
).
Remaining work for this PR is to update the help screen to note that if --proton
is left out, it will use the Per-Game Proton version by default. We also need to document this on the One-Time Run wiki. After that, a rebase, version bump, and merge.
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