Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

SDL_HINT_VIDEO_WAYLAND_MODE_SCALING - A variable controlling how modes with a non-native aspect ratio are

Availability

       This hint is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.10             SDL_HINT_VIDEO_WAYLAND_MODE_SCALING(3)

Description

       When  this  hint  is  set, the requested scaling will be used when displaying fullscreen video modes that
       don't match the display's native aspect ratio.  This is contingent on compositor viewport support.

       The variable can be set to the following values:

       • "aspect" - Video modes will be displayed scaled, in their proper aspect
         ratio, with black bars.

       • "stretch" - Video modes will be scaled to fill the entire display.
         (default)

       • "none" - Video modes will be displayed as 1:1 with no scaling.

       This hint should be set before creating a window.

Header File

       Defined in SDL3/SDL_hints.h

Name

       SDL_HINT_VIDEO_WAYLAND_MODE_SCALING - A variable controlling how modes with a non-native aspect ratio are
       displayed under Wayland.

Synopsis

#include"SDL3/SDL.h"#defineSDL_HINT_VIDEO_WAYLAND_MODE_SCALINGSDL_VIDEO_WAYLAND_MODE_SCALING"

See Also