Setting Mode 13

Mode 13 has similar enumeration and mode-setting behavior as Mode X. DirectDraw will only enumerate Mode 13 if the DDSCL_ALLOWMODEX flag was passed to the IDirectDraw2::SetCooperativeLevel method.

You enumerate the Mode 13 display mode like all other modes, but you make a surface capabilities check before calling IDirectDraw2::EnumDisplayModes. To do this, call IDirectDraw2::GetCaps and check for the DDSCAPS_STANDARDVGAMODE flag in the DDSCAPS structure after the method returns. If this flag is not present, then Mode 13 is not supported, and attempts to enumerate with the DDEDM_STANDARDVGAMODES flag will fail, returning DDERR_INVALIDPARAMS.

The EnumDisplayModes method now supports a new enumeration flag, DDEDM_STANDARDVGAMODES, which causes DirectDraw to enumerate Mode 13 in addition to the 320x200x8 Mode X mode. There is also a new IDirectDraw2::SetDisplayMode flag, DDSDM_STANDARDVGAMODE, which you must pass in order to distinguish Mode 13 from 320x200x8 Mode X.

Note that some video cards offer linear accelerated 320x200x8 modes. On such cards DirectDraw will not enumerate Mode 13, enumerating the linear mode instead. In this case, if you attempt to set Mode 13 by passing the DDSDM_STANDARDVGAMODE flag to SetDisplayMode, the method will succeed, but the linear mode will be used. This is analogous to the way that linear low resolution modes override Mode X modes.