Loading...
Searching...
No Matches
VideoMode.h File Reference
#include <SFML/Window/Export.h>
#include <stddef.h>

Go to the source code of this file.

Classes

struct  sfVideoMode
 sfVideoMode defines a video mode (width, height, bpp, frequency) and provides functions for getting modes supported by the display device More...
 

Functions

sfVideoMode sfVideoMode_getDesktopMode (void)
 Get the current desktop video mode.
 
const sfVideoModesfVideoMode_getFullscreenModes (size_t *count)
 Retrieve all the video modes supported in fullscreen mode.
 
sfBool sfVideoMode_isValid (sfVideoMode mode)
 Tell whether or not a video mode is valid.
 

Function Documentation

◆ sfVideoMode_getDesktopMode()

sfVideoMode sfVideoMode_getDesktopMode ( void  )

Get the current desktop video mode.

Returns
Current desktop video mode

◆ sfVideoMode_getFullscreenModes()

const sfVideoMode * sfVideoMode_getFullscreenModes ( size_t *  count)

Retrieve all the video modes supported in fullscreen mode.

When creating a fullscreen window, the video mode is restricted to be compatible with what the graphics driver and monitor support. This function returns the complete list of all video modes that can be used in fullscreen mode. The returned array is sorted from best to worst, so that the first element will always give the best mode (higher width, height and bits-per-pixel).

Parameters
countPointer to a variable that will be filled with the number of modes in the array
Returns
Pointer to an array containing all the supported fullscreen modes

◆ sfVideoMode_isValid()

sfBool sfVideoMode_isValid ( sfVideoMode  mode)

Tell whether or not a video mode is valid.

The validity of video modes is only relevant when using fullscreen windows; otherwise any video mode can be used with no restriction.

Parameters
modeVideo mode
Returns
sfTrue if the video mode is valid for fullscreen mode