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

Update "Enable D3D8to9" setting for SADX #253

Open
PiKeyAr opened this issue Nov 24, 2024 · 1 comment
Open

Update "Enable D3D8to9" setting for SADX #253

PiKeyAr opened this issue Nov 24, 2024 · 1 comment
Labels
enhancement New feature or request ready to close Issue is fixed and can be closed when the next update releases.

Comments

@PiKeyAr
Copy link
Member

PiKeyAr commented Nov 24, 2024

As of version 610, the SADX Mod Loader has an option to load d3d8to9 directly from the extlib folder so placing d3d8.dll in the game folder is no longer necessary. This makes it easier to use the Mod Loader on Linux/Steam because the WINE DLL override is no longer required in Steam launch options.

The update introduced the Render Backend option to the loader JSON file (RenderBackend in Graphics) which can have the following values as of now:
0 - DirectX 8.1 (default)
1 - DirectX 9 via d3d8to9

For a quick implementation, the "Enable D3D8to9" checkbox in Graphics options in the Mod Manager could be adjusted as follows:

  1. When the checkbox is checked, set RenderBackend to 1, do not copy d3d8.dll.
  2. When the checkbox is unchecked, set RenderBackend to 0 and remove d3d8.dll if it exists.
  3. The presence of d3d8.dll in the game folder should probably be checked on startup to determine the checkbox state for users coming from previous versions.
  4. If 'd3d8.dll' is found in the game folder, it should be deleted after (3).

If more backends are implemented in the future, the checkbox could be replaced with a "Graphics Backend" combo box that would let the user select different backends.

@PiKeyAr PiKeyAr added the enhancement New feature or request label Nov 24, 2024
@Sora-yx Sora-yx added the ready to close Issue is fixed and can be closed when the next update releases. label Nov 25, 2024
@PiKeyAr
Copy link
Member Author

PiKeyAr commented Dec 4, 2024

After testing this myself on Bazzite, I suggest removing d3d8.dll from the game folder either way, even when "Use Direct3D 9" is enabled. The presence of d3d8.dll in the game folder makes the WINE override necessary when the option is turned on. If the file is deleted, the loader's check doesn't trigger and it loads the custom DLL just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready to close Issue is fixed and can be closed when the next update releases.
Projects
None yet
Development

No branches or pull requests

2 participants