views:

87

answers:

1

Game application is written in C++ and uses DirectX 8.

I am getting a maximum monitor resolution to calculate it's aspect ratio. Then I use this value to fix game rendering (scale and set clipping to receive normal 4:3 image with black borders on wide screen monitors).

How can I check if monitor is using aspect ratio auto adjustment now? Because my scaling plus monitor scaling makes resulting image overscaled.

Thanks

EDIT: I saw correct different monitor resolution handling with or without aspect ratio auto adjustment in "Royal Envoy" casual game. But don't know how do they do this.

+2  A: 

Often this is implemented in the monitor itself, so the application would have no way to detect this case.

Note that you also need to handle the case where the monitor resolution is set to 1280x1024, which is 5:4 resolution using non-square pixels (where the display dimensions are still physically 4:3). Assuming your pixels are square is not always correct. (Although there's probably a way to query the OS or other window manager for this information.)

dash-tom-bang
Thanks. Does anybody know how to get if pixels are square?
kFk
@kFk - I do not recall, but I thought there was a WinAPI call to get that information. It may be stuffed down in some display properties structure, though.
dash-tom-bang