|
|
|
|
SetCustomVideoMode
Sets a specified custom display mode.
Declaration
N_int32 NAPI GA_initFuncs::SetCustomVideoMode(
N_int32 xRes,
N_int32 yRes,
N_int32 bitsPerPixel,
N_uint32 flags,
N_int32 *virtualX,
N_int32 *virtualY,
N_int32 *bytesPerLine,
N_int32 *maxMem,
GA_CRTCInfo *crtc)
Prototype In
snap/graphics.h
Parameters
xRes |
Physical X resolution for the display mode |
yRes |
Physical Y resolution for the display mode |
bitsPerPixel |
Color depth for the display mode |
flags |
Mode initialisation flags |
virtualX |
Requested virtual display X resolution (-1 to use default) |
virtualY |
Requested virtual display Y resolution (-1 to use default) |
bytesPerLine |
Returns the scanline width for the mode |
maxMem |
Returns the maximum addressable display memory limit |
crtc |
CRTC information block (required) |
Return Value
0 on success, -1 on failure
Description
This function is used to initialize a specific custom display mode. The custom display mode does not have to be one of that macthes the resolution and refresh rate for modes stored in the AvailableModes list of the GA_devCtx structure. Any value outside what the hardware is capable of displaying, will cause this function to return a failure condition. Make sure you first call GetCustomVideoModeInfo to determine if the requested mode is actually supported.
For the most part this function is identical to the regular SetVideoMode function, but works with custom display modes rather than the list of valid modes in the device driver mode profile. Since internally SNAP drivers have no concept of display modes, the SetVideoMode function internally ends up calling this function to actually initialise a display mode.
This function also accepts the flags defined in GA_modeFlagsType enumeration passed in the flags parameter. These flags change the way that the selected display mode mode is initialized, and are identical to the flags passed to the regular SetVideoMode function.
Note: This function requires a set of CRTC parameters to be passed in the crtc parameter, unlike SetVideoMode.
See Also
SetVideoMode, GetVideoModeInfo, GetCustomVideoModeInfo, SetDisplayOutput, GetClosestPixelClock
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com