-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add a way to check backend at runtime #63
Comments
I think matching against loaded DLLs would be more than enough for 99% of use cases, but I have also been briefly looking into querying the COM interfaces, though I'm afraid that would be flimsier. As per how to have double hooks in |
These are the modules which are available in the games I have tried. Looking at this list it should be possible to build a best-effort backend checker. Funnily enough, both the OpenGL 3 and the DirectX 11 renderers work for Baldur's Gate so either result would be fine, but for Elden Ring which also loads OpenGL that is not true. So at a minimum I'd introduce a priority mechanism where dx12 > dx11 > dx9 > opengl3 |
At the end of the day I ended up doing something incredibly idiotic but it did work heh, haven't had the need to do anything more extensive. |
Well, that's not much different from the way I'd have implemented something like that :D Thinking about it, I guess this kind of logic might depend heavily on each client's needs, so not sure whether to include it as a first-party thing. It would probably still be a good idea to have a cookbook of these strategies in |
Ugh, so, recently, The Witcher 3 was updated and now provides two binaries, one that uses DX12 and the other one that uses DX11. Most of the other code is shared so the tool works by only changing the
into_hook
type.I can easily produce two DLLs for each one using some compile-time features, but I'm not to keen into that solution.
I'm also thinking what's an easy way of detecting this at runtime? A stupidly simple way I think is using
GetModuleHandle
to check which DLL is loaded?The text was updated successfully, but these errors were encountered: