Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distinguish between panning and normal screen modes in code - Windows

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?

like image 332
Bill Kotsias Avatar asked Jul 23 '10 08:07

Bill Kotsias


1 Answers

@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.

like image 58
khedoros Avatar answered Oct 16 '22 15:10

khedoros