Skip to content
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

ReShade INI being overwritten/deleted #1071

Closed
zany130 opened this issue Mar 20, 2024 · 10 comments
Closed

ReShade INI being overwritten/deleted #1071

zany130 opened this issue Mar 20, 2024 · 10 comments
Labels
bug Something isn't working ReShade Issues related to using ReShade with SteamTinkerLaunch

Comments

@zany130
Copy link
Collaborator

zany130 commented Mar 20, 2024

System Information

  • SteamTinkerLaunch version:
  • Distribution:
  • Installation Method:

Issue Description

setting CREATERESHINI to 1 creates a ReShade ini as expected but it will also overwrite existing ReShade ini's so it looks like the check for existing ini is not working.

Even stranger for some reason in Persona 3 Reloaded disabling CREATERESHINI causes the existing ReShade ini to be deleted.

my understanding is if CREATERESHINI is 0 it just skips the ini creation code. It shouldn't be deleting the ini... yet for some reason setting it to 0 causes this

Logs

2161700.log

@zany130 zany130 added the bug Something isn't working label Mar 20, 2024
@sonic2kk
Copy link
Owner

I can reproduce the removing INI behaviour, not sure why though. I don't think this is intended., as per the note on the OP for PR #1000

and also we should not[e] that this will not remove an existing ReShade IN

so it looks like the check for existing ini is not working.

Hm, I don't remember if we're supposed to do this, but it sounds sensible, so I'll take a look for this too.

@sonic2kk
Copy link
Owner

The removal code for the INI is handled in removeReShadeSpecialKInstallation.

This looks like a mistake on my part:

	if [ "$KEEPRESHADEINI" -eq 1 ]; then
		rmFileIfExists "$INSTDESTDIR/$RSINI"
	fi

My guess is that we're supposed to check -eq 0 based on the variable name (i.e. if KEEPRESHADEINI == false, remove INI).

@sonic2kk
Copy link
Owner

sonic2kk commented Mar 20, 2024

Yeah, changing the above to check -eq 0 fixes it. This is a bug introduced in #921 I think (https://github.com/sonic2kk/steamtinkerlaunch/pull/921/files#diff-77c6d4bb1bf7c1988ff5a068c856b6c24e113663f2e61cb3a2c98723c0fafc04R8931) which was not in a release, so I won't note this fix on the changelog.

I also think this behaviour is incorrect, not just logically, but because it doesn't match the behaviour in removeReShadeInstallation, which uses [ "$KEEPRESHADEINI" -eq 0 ];.

As for checking for an existing INI, I'll take a look at this too. Would this be a valid testing scenario?

  1. Start a game with no SteamTinkerLaunch config and no ReShade files installed from SteamTinkerLaunch.
  2. Place a "ReShade.ini" file in the same folder as the EXE, where SteamTinkerLaunch would create it.
  3. Start a game with a fresh SteamTinkerLaunch config and enable ReShade, with the default option to CREATERESHADEINI enabled.
  4. SteamTinkerLaunch will (probably incorrectly) overwrite the existing ReShade INI file.
  5. Close game, and manually edit the ReShade INI
  6. Restart game with SteamTinkerLaunch and the INI will still get overwritten
  7. Close game, manually edit the ReShade INI again :-)
  8. Start game without SteamTinkerLaunch and manually load ReShade (if it is not automatically picked up, setting a DLL override from the launch options should force the game to pick it up), INI will not get overwritten, which will confirm that SteamTinkerLaunch is overwriting the file and not ReShade itself on load

Likely, overwriting an existing ReShade INI is also a bug introduced as part of the major ReShade rework, so once investigated if a fix is needed I probably won't note this on the changelog either :-)

@sonic2kk
Copy link
Owner

Huh, it seems correcting the line to if [ "$KEEPRESHADEINI" -eq 1 ]; then fixes the ReShade INI overwrite issue. I tested by adding PerformanceMode=1 locally with the fix.

There is likely no need for a PR for this, so I'll just push the fix directly to master.

@sonic2kk sonic2kk reopened this Mar 20, 2024
@sonic2kk
Copy link
Owner

sonic2kk commented Mar 20, 2024

This was automatically closed because I mentioned the issue, even though I deliberately used "may fix" ;-_-

Whenever you can, please test out that commit and see if it fixes your problem :-) If the problem really was this simple, well, that's embarrassing that I didn't catch it earlier...

@sonic2kk sonic2kk added the ReShade Issues related to using ReShade with SteamTinkerLaunch label Mar 20, 2024
@sonic2kk
Copy link
Owner

Should've created a ReShade label long ago, but never got around to it until now. Better late than never! 😄

@zany130
Copy link
Collaborator Author

zany130 commented Mar 20, 2024

Will test on my end when I get home. But from your earlier comments I think it was that easy 😂 had a feeling there was incorrect conditional lol

@zany130
Copy link
Collaborator Author

zany130 commented Mar 21, 2024

was able to confirm that the overwrite part of the bug is fixed. Haven't tested an existing in being deleted if the option is disabled yet.... will test latter today

@zany130
Copy link
Collaborator Author

zany130 commented Mar 21, 2024

Yup everthing looks good ini is no longer overridden or deleted sorry i took so long to get back to this

@zany130 zany130 closed this as completed Mar 21, 2024
@sonic2kk
Copy link
Owner

No problem :-) If I had actually gotten around to playing more of P3R, I'd make a Persona-related "happy gaming" reply, but I haven't, so it's just "happy gaming" to you for now :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ReShade Issues related to using ReShade with SteamTinkerLaunch
Projects
None yet
Development

No branches or pull requests

2 participants