Add DirectX9Ex support - #260
super-continent wants to merge 2 commits into
Conversation
|
Thank you for your contribution! 🙌 Haven't looked it over in depth yet, but I wonder if there is a lot of code that's copied we might make this PR smaller by sharing common behavior rather than duplicating functions. This would help a lot with maintainability. |
|
This might be possible, the Present and Reset functions are the same as DX9 in this case. I'm unsure how to cleanly structure a merge like that though. An impl macro could work but that could end up being hard to read depending on how complex we need to make it |
|
Hi, sorry this took a while but I haven't really been able to spend any time working on open source lately 😓 Apparently use super::dx9::{render, init_pipeline, reset_pipeline);
// later...
if let Err(e) = render(&device.deref()) {
error!("Render error: {e:?}");
}Could structure the module like and remove those functions and Possibly also the harness could be deduplicated, but I'm not really worried about that. It's fine for it to stay duplicated. |
|
This should be a more maintainable version of the change. |
This adds support for hooking DirectX9Ex, which is used in a few different programs that I want to work on using the crate (great work btw, thanks for maintaining something like this!) The code itself is mostly a copy of the current D3D9 code, with all the modifications needed to support the
Exvariants of the hooked functions