SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

SDL_DisplayMode

The structure that defines a display mode.

Header File

Defined in SDL_video.h, but apps should use #include <SDL3/SDL.h>

Syntax

typedef struct SDL_DisplayMode
{
    SDL_DisplayID displayID;    /**< the display this mode is associated with */
    SDL_PixelFormatEnum format; /**< pixel format */
    int w;                      /**< width */
    int h;                      /**< height */
    float pixel_density;        /**< scale converting size to pixels (e.g. a 1920x1080 mode with 2.0 scale would have 3840x2160 pixels) */
    float refresh_rate;         /**< refresh rate (or zero for unspecified) */
    void *driverdata;           /**< driver-specific data, initialize to 0 */
} SDL_DisplayMode;

Version

This struct is available since SDL 3.0.0.

See Also


CategoryAPI, CategoryAPIStruct


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.