-
Notifications
You must be signed in to change notification settings - Fork 78
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
Make d3dx9_xx.dll load dynamically #16
Conversation
d3dx8_43.dll was loaded statically before. Some systems have different versions of this dll. Change it to load dynamically based on the version available on the system.
I don't think this is necessary. D3DX is deprecated and won't be updated anymore (https://blogs.msdn.microsoft.com/chuckw/2013/08/20/living-without-d3dx/), meaning |
Yes, you are probably right. However I use this project inside a larger project and I did not want this dll to be static because the dll is not always needed for me. I suspect others may do the same thing. Also on my test system (Windows 7) I only have If you want I can change the number to start counting down at a smaller number rather than 99, like we can start at 50. I did see some references to |
As soon as you install a DirectX game via Steam it will almost always install the DirectX libraries including |
Ok, understood. Thanks for looking at it. I will just have this on my branch. |
While I don't like the way this is trying for different DLL versions, loading it dynamically could still be beneficial since not everyone has DX redists installed (you'd be surprised how many people do not have them!) and I don't think shaders were a common thing in d3d8 days - so most games would be unaffected. |
Ok, let me change that to dynamically load |
Removed the code to search for different versions of "d3dx9_43.dll"
source/d3d8to9_device.cpp
Outdated
// Load dll | ||
dllHandle = LoadLibrary(d3dx9name); | ||
} | ||
dllHandle = LoadLibrary("d3dx9_43.dll"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unicode please? =) This is the first ever line which will be affected by multibyte/Unicode switch so while I'm not a fan of using MS macroes for multibyte/Unicode, ideally you could replace those two lines with
HMODULE dllHandle = LoadLibrary(TEXT("d3dx9_43.dll"));
and support both character encodings at once. Still, project should probably end up being switched to Unicode as it's the way Windows-only projects should be handled these days to be honest.
Using MS macro for multibyte/Unicode. Also made minor updates to the comments to fix the dll name.
Ok, good call. Just updated this to support Unicode, as requested. |
Alright. You got me convinced. I'll clean this up a little in a follow-up commit though. |
d3dx8_43.dll was loaded statically before. Some systems have different versions of this dll. Changed it to load dynamically based on the version available on the system.
Note: This is also done by other programs. Check out the log from ts3overlay here.