PgSetVideoMode()

Set the current video mode

Synopsis:

int PgSetVideoMode( PgDisplaySettings_t *settings );

Library:

ph

Description:

This function sets the current video mode to the settings given in the the PgDisplaySettings_t structure pointed to by settings, which includes at least the following:

unsigned mode
The number of the current mode for the video card.
int refresh
The refresh rate, in Hz. A refresh rate of 0 requests the default rate for this mode (usually 60Hz).
unsigned flags
There are currently no flags defined.

Note: You must target this function at a specific card by calling PdSetTargetDevice(). PgSetVideoMode() blocks until the operation is complete.

Returns:

0
Success.
-1
An error occurred. PgSetVideoMode() returns an error if more than one layer is currently active via the Pg Layer family of calls. By default, io-graphics utilizes one layer.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgGetGraphicsHWCaps(), PgGetVideoMode(), PgGetVideoModeInfo(), PgGetVideoModeList()

Video modes in the Raw Drawing and Animation chapter of the Photon Programmer's Guide