-
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
Allow DirectX hooking using existing device pointer #107
Comments
Hi! This would probably require a big change in the API, though I admit if we had access to devices before having the hooks we could skip the whole song and dance of initializing dummy devices for finding out the That panic doesn't depend on the device that's found in the game, though; rather in a failure to create a new dummy device with DirectX 9. I don't know about the inner workings of
I've never worked with older DirectX releases (9 included, I didn't create it) so I'm not sure how to proceed in this case. I feel like it would be worth it investigating the exact reasons for that panic, though. Unfortunately observability is a bit lacking in this case so that might be tricky. By the way, what game is it? I can try running hudhook against it if I happen to have it, maybe I can get to an answer faster. Feel free to open a PR for this if you have ideas about how to proceed! |
Hi, Thanks for the quick response! the error code appears to be as for the way the game i'm testing against is Scrapland Remastered the original is from 2005 which is probably why they still use DirectX8 (and maybe MercurySteam recycles some internal game engine for it) Best regards, |
This has happened often before -- seemingly correct
Ok, so de facto the DirectX 9 calls are all that really happens under the hood, so the dx9 hook should work.
Hmmm, this is tricky. Definitely not generalizable. But on the other hand you should not need to inject your own device at all; hooking the I need to add some observability to that -- currently the way I handle errors is very crude, but there are issues that plan to get that sorted out.
I don't have access to that unfortunately. Best I can do is add observability so that the errors can be a little easier to understand. |
I ran into this same issue, but without d3d8to9. The issue is (I think) related to |
Mmm, if it is a limitation of Wine there's not much to do there. It's weird because afaik some stuff made in hudhook does work unmodified on the steam deck. Could try going back to using On the other hand, the new unified rendering approach as of #141 might remove the need for an external window altogether as I've figured out setting up the swap chains to an off screen surface to get the vtable pointers without attaching a hwnd. That might be applicable to dx9 too, not sure but hopeful. |
Yeah, I wouldn't expect the library to work around Wine limitations for sure. Just wanted to point that out in case other people run into the same issue. I currently have it working with a vendored copy of As for why it works on the Steam Deck, I would imagine that this is something Proton has a fix for. To be honest it caught me off guard to see that error message because it seems like such a fundamental function for Wine to handle! |
I may have found a workaround for this; tried to make The bad news is this will only land when the porting as of #141 will be done. The good news is that it might happen soonish. |
Hi,
would it be possible to add a function to initialize hudhook with an existing Direct9Device pointer? one of my projects is an overlay for a DirectX8 game which i'm running through d3d8to9 but initialize hudhook using the following code:
fails with the following error message:
Best regards,
Earthnuker
The text was updated successfully, but these errors were encountered: