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

Special K: Add toggle for installing d3dcompiler_47 #932

Merged
merged 7 commits into from Oct 9, 2023

Conversation

sonic2kk
Copy link
Owner

@sonic2kk sonic2kk commented Oct 8, 2023

Final piece of #894, though quite minor and seems to only affect me.

Overview

This PR implements a toggle for installing d3dcompiler_47.dll for Special K. This DLL can cause crashes on some systems if used, particularly if used with ReShade, so this toggle allows a user to choose whether they want this DLL and they can turn it off if it causes a game crash.

image

The goal here is to provide an optional way to use d3dcompiler_47 to prevent this crash. In testing it seems that Valve Proton requires this DLL, but GE-Proton and Proton-tkg will crash with it, possibly due to differences in patches and so on. Users can use this option in combination with a Proton version change, so the hope is this feature provides even more flexibility for tinkering.

To make clear: This only applies for Special K! ReShade is not relevant here, as I have not seen a case where the DLL causes a crash when present.

Implementation

The existing installd3d47 code will skip installing the DLL if the file exists, unconditionally. Even if SteamTinkerLaunch didn't install it (i.e. it's not tracked in SpecialK_enabled.txt). So if this DLL already exists in the game files, such as with the XCOM 2 launcher, we would not install it.

If the DLL already exists in the game files, we will use that, otherwise we'll install it ourselves. When the checkbox is disabled, we will remove the DLL only if we were the ones that installed it (if it's in SpecialK_enabled.txt).


TODO:

  • More testing (SpecialK on/off, SpecialK+ReShade combinations, etc)
  • Update SpecialK wiki page with information about this option
  • Update langfiles

This can cause crashes on some systems if used, particularly if used with ReShade,
so this toggle allows a user to choose whether they want this feature.
@sonic2kk
Copy link
Owner Author

sonic2kk commented Oct 9, 2023

Fixed a few edge case issues identified in testing. Will do some testing with ReShade+SpecialK, and if that works, I will bump the langfiles and merge.

@sonic2kk
Copy link
Owner Author

sonic2kk commented Oct 9, 2023

Interesting, the crash I was having no longer occurs with the newer Mesa version and newer GE-Proton versions, but it could re-occur I suppose. I think this option is still useful to have, though, just in case.

@sonic2kk
Copy link
Owner Author

sonic2kk commented Oct 9, 2023

Looks like SpecialK DLLs were not exported properly in some cases, fixed that.

@sonic2kk
Copy link
Owner Author

sonic2kk commented Oct 9, 2023

Tested with SpecialK and it works, it also works with SpecialK+ReShade.

Pending a langfile update, this should be good to merge.

@sonic2kk
Copy link
Owner Author

sonic2kk commented Oct 9, 2023

Done!

@sonic2kk sonic2kk merged commit a116e59 into master Oct 9, 2023
@sonic2kk
Copy link
Owner Author

sonic2kk commented Oct 9, 2023

SpecialK wiki page was updated as well.

@sonic2kk sonic2kk linked an issue Oct 9, 2023 that may be closed by this pull request
@sonic2kk sonic2kk deleted the spek-d3dcompiler-toggle branch October 10, 2023 18:52
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 compatibility with Special K
1 participant