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

Adding an option to force loading of d3dx9_43.dll? #22

Closed
HerMajestyDrMona opened this issue May 11, 2017 · 7 comments
Closed

Adding an option to force loading of d3dx9_43.dll? #22

HerMajestyDrMona opened this issue May 11, 2017 · 7 comments

Comments

@HerMajestyDrMona
Copy link
Contributor

HerMajestyDrMona commented May 11, 2017

Hello. After the last changes, the converter doesn't longer throw an error when "d3dx9_43.dll is missing", when users don't install required DirectX 9 SDKs. In some games it causes graphics bugs like missing/deformed textures: http://i.imgur.com/KwbVZLA.jpg
I would rather want to see an error on game start, than experiencing graphics bugs. Is there any option to force d3dx9_43.dll loading, just as it used to be in previous versions of d3d8to9?
I tried adding d3dx9.lib to additional dependencies, but it doesn't seem to help (still not "missing .dll" error).

@crosire
Copy link
Owner

crosire commented May 17, 2017

Mmh. The error should be made more noticable, I agree. Could display an error messagebox instead of just silently writing a log message ...

@HerMajestyDrMona
Copy link
Contributor Author

I noticed that before commit: "Clean up code" ( 9eb8faa )
When I added d3dx9.lib to additional dependencies, and file "C:\Windows\SysWOW64\D3DX9_43.dll" was missing - it still displayed an error that it's unable to start the application because d3dx9_43.dll is missing. So I suppose that one of those cleaning changes "fixed" it. Do you maybe know what change could cause it? Maybe I could add some unused function to the code, something to force d3dx9_43.dll loading? I don't know anything about DirectX API, so I would very appreciate any recommendation. I think system errors are better than message boxes created by a .dll file (when a .dll file is missing then some Windows process displays the error, not the app itself),

@crosire
Copy link
Owner

crosire commented May 17, 2017

This was changed in and because of #16.

@HerMajestyDrMona
Copy link
Contributor Author

You're right. I double checked it. Seems like I was testing in a wrong folder and I thought it already had #16 :) I'll see if I can revert this change later, or at least add a workaround.

@elishacloud
Copy link
Contributor

I would not recommend reverting change #16. Instead you could add two lines to d3d8to9.cpp after this line:

LOG << "Failed to load d3dx9_43.dll! Some features will not work correctly." << std::endl;

Add these lines:

MessageBox(nullptr, TEXT("Failed to load \"d3dx9_43.dll\"!"), nullptr, MB_ICONWARNING);
return nullptr;

That should do what you want.

@HerMajestyDrMona
Copy link
Contributor Author

HerMajestyDrMona commented May 19, 2017

Thank you. Seems like this solution is acceptable too :) I made more detailed error message with MB_OKCANCEL, and also ShellExecute with: https://www.microsoft.com/en-us/download/details.aspx?id=8109 when user clicks "OK". It opens the site where the missing "End-User Runtime" can be downloaded.

@crosire
Copy link
Owner

crosire commented May 24, 2017

Closed in #23.

@crosire crosire closed this as completed May 24, 2017
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

No branches or pull requests

3 participants