#include <screen/screen.h> int screen_get_display_modes( screen_display_t display, int max, screen_display_mode_t *param );
- The handle of the display for which to return the supported display modes.
- The maximum number of display modes that can be written to the array of modes pointed to by param.
- A pointer to a buffer containing the new values.
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 will be stored.
A successful return value indicates that any delayed command and the flushing command all executed without errors. Conversely, if a flushing API returns an error, it could have been caused by a batch-processed command that did not execute properly, or the flushing call itself encountering an error. It is important to note that the server won't stop processing batched commands when it detects an error.
- The function succeeded and the value (or values) of the display property are changed.
- An error occurred (errno is set).