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: Use ALTEXEPATH to install ReShade DLLs for Custom Commands with ONLY_CUSTOMCMD=1 #1092

Merged
merged 4 commits into from Apr 22, 2024

Conversation

sonic2kk
Copy link
Owner

@sonic2kk sonic2kk commented Apr 21, 2024

Fixes #1089.

This PR adds an extra check to setFullGameExePath, where if an alternative EXE path is defined, this should be used in place of the custom command EXE directory. This makes sense to me, as the order of priority should be to use ALTEXEPATH above all other paths when deciding where to put things, and otherwise either the custom command folder (if custom commands are enabled) or the game EXE folder should be used.

This should address an issue where when installing ReShade with ONLY_CUSTOMCMD enabled, ReShade would install shaders to the ALTEXEPATH (as this is handled by setShadDest) but it would not do this for the ReShade DLLs - handled by a call in installReshade to setShadDestDir, which in turn calls setFullGameExePath to get the path where the DLLs should be installed.

This will need some testing to ensure this doesn't cause any regressions. The following cases should be testing:

  • Regular game launches should still work fine
  • Regular game launches with an Alt EXE dir should respect the chosen alt EXE path
  • Custom commands with alt EXE paths chosen should respect it with ReShade
  • Custom commands with alt EXE paths chosen should respect it without ReShade

@zany130
Copy link
Collaborator

zany130 commented Apr 21, 2024

sorry for the late test. I got sidetracked with other things, but....

it seems its still installing into the custom command dir steamtinkerlaunch.log

@sonic2kk
Copy link
Owner Author

Oops, that's because I'm an idiot and removed a line that is supposed to be there... DEFINEDALTEXEPATH is never set so it never uses it. Really sorry about that...

@sonic2kk
Copy link
Owner Author

Should work now with 3b6ffb0.

@zany130
Copy link
Collaborator

zany130 commented Apr 21, 2024

Works as expected for my case of using persona 3 reload with the reloaded mod manager.

Ill also test to see if everything works as expected when there is no custom command.

Unfortunately, I don't think I have any games that have launchers in a different directory than the main executable (Star Wars, maybe?).

@sonic2kk
Copy link
Owner Author

I'll do some testing tomorrow of that case as well then keeping an extra eye on it, but sounds like this is in a good position! Thanks!

@sonic2kk
Copy link
Owner Author

Didn't get a chance to test this again today, but once I have time I will and will merge this hopefully soon into the week.

@zany130
Copy link
Collaborator

zany130 commented Apr 22, 2024

no worries I haven't been able to test extensively but I did fire up a few different games and mad sure it installs Reshade games no regressions there

@sonic2kk
Copy link
Owner Author

Seems safe in my tests as well. Pending CI this will be merged :-)

@sonic2kk sonic2kk merged commit 5b5b086 into master Apr 22, 2024
2 checks passed
@sonic2kk sonic2kk deleted the fix-reshade-dlls-custcmd branch May 4, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reshade always installs into custom command directory when using ONLY_CUSTOMCMD with no way to override
2 participants