agrippa1994 / DX9-Overlay-API

Overlay API for DirectX 9 based games.
MIT License
127 stars 26 forks source link

800x600 canvas only? #14

Closed evilC closed 8 years ago

evilC commented 10 years ago

Would it be possible to enable us to set the canvas size? I could do with a 1:1 ratio to game resolution.

agrippa1994 commented 10 years ago

Every drawing element is adjusted to a size of 800 x 600 because everyone has another resolution. If you have a resolution of 1920 x 1080 the drawing object will be scaled up 1920x1080. That means that the resolution is independent.

evilC commented 10 years ago

800x600 scaled up is not much use to me in many situations. I am using pixel detection to obtain information about game state. I need to be able to allow users to select the pixel they wish to watch - the obvious method is to put a crosshair overlay on screen and let them move it until it covers the pixel they wish to watch. With 800x600 scaled up, it is impossible to draw a crosshair that only covers one pixel on the screen...

Surely you could default to 800x600, but allow people to specify a different res at initialization time?

Also 800x600 is a 4:3 res. This means that the shape of everything is distorted when you do the rescale if you are not running the game in a 4:3 res (ie just about everybody).

Nithanim commented 9 years ago

I find that a big limitation too, so I forked it and removed the scaling. f6ef7d3c2807c1cf399135e3efc925efb710b1a1

agrippa1994 commented 9 years ago

The canvas can be set manually with SetCalculationRatio now. https://github.com/agrippa1994/DX9-Overlay-API/commit/0b03d9c5b0517fab121556ef328689407ed2438f