I am writing a full-screen 3D game and I have created a menu in which the user may select the screen resolution to match his hardware capacity.
I am enumerating all the available screen modes with EnumDisplaySettingsExA
like this:
std::vector<DEVMODEA> modes;
DEVMODEA modeInfo;
int modeNum = -1;
while (EnumDisplaySettingsExA(0, ++modeNum, &modeInfo, 0)) {
if (modeInfo.dmBitsPerPel < 16) continue;
modes.push_back( modeInfo );
}
The problem is, I am getting panning-modes as well! I can't distinguish which are which; for example my ATI laptop has a maximum normal mode of 1280x800, but also contains a panning-mode of 1024x600!
Anyone knows of a way to distinguish between the 2, so I can reject panning-modes from my menu?
@Martin: I'm guessing the OP just put the res's in the wrong order.
Is this link about what you're looking for?
It looks like it's the proper way to get the pixel dimensions of a screen in Windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With