Set the display mode to use when a window is visible and fullscreen.
int SDL_SetWindowFullscreenMode(SDL_Window *window, const SDL_DisplayMode *mode);
window | the window to affect |
mode | a pointer to the display mode to use, which can be NULL for desktop mode, or one of the fullscreen modes returned by SDL_GetFullscreenDisplayModes(). |
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
This only affects the display mode used when the window is fullscreen. To change the window size when the window is not fullscreen, use SDL_SetWindowSize().
This function is available since SDL 3.0.0.