GM_findMode

Finds an available mode that has the desired resolution and color depth.

Declaration

ibool MGLAPI GM_findMode(
GM_modeInfo *mode,
int xRes,
int yRes,
int bits)

Prototype In

gm/gm.h

Parameters

mode | Place to store the returned graphics mode information
xRes | X resolution of the mode to find
yRes | Y resolution of the mode to find
bits | Color depth of the mode to find (-1 for don't care)

Return Value

True if a valid mode was found, false if not found.

Description

This function searches the list of available graphics modes for one that matches the desired resolution and color depth. This is most useful for finding a good default graphics mode to start your game in if the user has not selected a default mode yet. Note that this function searches for the mode from the top of the list backwards, so that we find the highest performance 320x200 and 320x240 modes (i.e.: the Linear Framebuffer modes rather than the VGA ModeX or Standard VGA modes).

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com