video_switch (var mode,var depth,var screen)

Switches the screen to the resolution given by mode, and/or to fullscreen or window mode. The video_mode, video_screen, and screen_size variables are automatically set to their new values.

Parameters:

mode - 0 for no change, or the mode number that determines the new screen resolution (see video_mode).
depth - always 0.
screen - a combination of the following modes:
   0
= no change,
   1
= fullscreen,
   2 = window,
   4 = only set screen_size to the desired resolution, but don't actually change the resolution, A7.7
   8 = enforce 4:3 resolutions.

Returns:

0 if the video mode is not supported, otherwise the number of the new mode.

Modifies:

video_mode new resolution
video_screen fullscreen or window mode
screen_size height and width in pixel

Speed:

Slow

Remarks:

Examples:

if(video_switch(7,0,0) == 0)
{
   video_switch(6,0,0);
}   

See also:

video_mode, video_screen, video_aspect, screen_size, video_window, video_set

► latest version online