isJuhn / KAMI

Kot And Mouse Injector
MIT License
124 stars 13 forks source link

DPI fixes, part 2 #8

Closed dio-gh closed 3 years ago

dio-gh commented 3 years ago

This change makes KAMI hidpi aware, via utilizing the app.manifest file. For some ungodly reason this works today, despite having tested it yesterday with a different result. Seems to fix drifting when using OBS on the side, for some yet another ungodly reason. Plus, it's neater, and doesn't make the cursor to be put off-center.

The PR also changes out GetWindowRect() with GetClientRect() and then utilizes ClientToScreen() for grabbing the correct screen coordinates from that. This make slightly more sense, since we care about the internal sizes and coordinates of the game window, not the external one, and will also come in handy for AR injection down the line.