DirectX SDK |
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 IDirectDraw7::SetCooperativeLevel method.
You enumerate the Mode 13 display mode like all other modes, but you make a surface capabilities check before calling IDirectDraw7::EnumDisplayModes. To do this, call IDirectDraw7::GetCaps and check for the DDSCAPS_STANDARDVGAMODE flag in the DDSCAPS2 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 IDirectDraw7::SetDisplayMode flag, DDSDM_STANDARDVGAMODE, which you must pass in order to distinguish Mode 13 from 320x200x8 Mode X.
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 DirectDraw7.SetCooperativeLevel method.
You enumerate the Mode 13 display mode like all other modes, but you make a surface capabilities check before calling DirectDraw7.GetDisplayModesEnum. To do this, call DirectDraw7.GetCaps and check for the DDSCAPS_STANDARDVGAMODE flag in the DDSCAPS2 type 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, generating DDERR_INVALIDPARAMS.
The GetDisplayModesEnum method now supports an enumeration flag, DDEDM_STANDARDVGAMODES, which causes DirectDraw to enumerate Mode 13 in addition to the 320x200x8 Mode X mode. There is also a new DirectDraw7.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.