screen_get_display_modes()

Retrieve the display modes supported by a specified display

Synopsis:

#include <screen/screen.h>
int screen_get_display_modes(screen_display_t display,
                             int max,
                             screen_display_mode_t *param)

Arguments:

display
The handle of the display whose display modes are being queried.
max
The maximum number of display modes that can be written to the array of modes pointed to by param.
param
The buffer where the retrieved display modes is stored.

Library:

libscreen

Description:

Function Type: Flushing Execution

This function returns the video modes that are supported by a display. All elements in the list are unique. Note that several modes can have identical resolutions and differ only in refresh rate or aspect ratio. You can obtain the number of modes supported by querying the SCREEN_PROPERTY_MODE_COUNT property. No more than max modes is stored.

Returns:

0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).