veeenu / hudhook

A videogame overlay framework written in Rust, supporting DirectX and OpenGL
MIT License
207 stars 30 forks source link

Choose command queue associated to swap chain in DirectX 12 hook #209

Closed veeenu closed 2 weeks ago

veeenu commented 3 weeks ago

This PR changes the selection mechanism for the command queue. Whenever a command queue is detected via the ExecuteCommandLists hook, the command queue pointer is matched against the memory next to the swap chain. The assumption is that the swap chain will hold a reference to the command queue it uses. This is predicated on the fact that CreateSwapChainForHwnd accepts a command queue in DirectX 12.

A state machine enum implements the requisite logic.

Closes #203.