veeenu / hudhook

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

DX9 ImGui unresponsive #137

Open vars1ty opened 8 months ago

vars1ty commented 8 months ago

The DirectX9 ImGui doesn't react nor detect proper mouse position in the same game as in #132. It logs the position as "100, 100" and never recognizes any change, apart from sudden 1-frame drops to like 0, 0.

Code is the sample code from examples.

veeenu commented 8 months ago

I can't work on this at the moment, but could you try deleting the first #[cfg] statement and the entirety of the second block here?

https://github.com/veeenu/hudhook/blob/bebcddcb82f462061c1101383001677b4af276ee/src/hooks/dx9.rs#L39-L51

So that only this part remains:

https://github.com/veeenu/hudhook/blob/bebcddcb82f462061c1101383001677b4af276ee/src/hooks/dx9.rs#L40-L44

Let me know if that fixes things; in that case, please open a PR so I can merge that in.

vars1ty commented 7 months ago

Hi, sorry for the late response, been busy. I tried that just now, and it makes no difference from what I can tell. The game in question is an offline RPG which does some very weird hacky things to its window, here it is if you'd like to take a look when you've got the time: https://archive.org/download/star-stable-win-iso-en.-cz.-fi.-hu.-de.-no.-se_202011/Star_Stable_Win_ISO_EN.CZ.FI.HU.DE.NO.SE.zip

veeenu commented 7 months ago

No worries!

In all honesty, I'm not sure we should support programs which have weird unintended usages of the windows API, sounds like a game of cat and mouse against an API surface which is already difficult to work with. I'll give it a try though!