mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-01 23:07:45 +08:00
wayland: Change the non-native fullscreen mode scaling default to 'aspect'
This commit is contained in:
@@ -4037,9 +4037,8 @@ extern "C" {
|
|||||||
* The variable can be set to the following values:
|
* The variable can be set to the following values:
|
||||||
*
|
*
|
||||||
* - "aspect" - Video modes will be displayed scaled, in their proper aspect
|
* - "aspect" - Video modes will be displayed scaled, in their proper aspect
|
||||||
* ratio, with black bars.
|
* ratio, with black bars. (default)
|
||||||
* - "stretch" - Video modes will be scaled to fill the entire display.
|
* - "stretch" - Video modes will be scaled to fill the entire display.
|
||||||
* (default)
|
|
||||||
* - "none" - Video modes will be displayed as 1:1 with no scaling.
|
* - "none" - Video modes will be displayed as 1:1 with no scaling.
|
||||||
*
|
*
|
||||||
* This hint should be set before creating a window.
|
* This hint should be set before creating a window.
|
||||||
|
|||||||
@@ -103,15 +103,15 @@ static enum WaylandModeScale GetModeScaleMethod(void)
|
|||||||
const char *scale_hint = SDL_GetHint(SDL_HINT_VIDEO_WAYLAND_MODE_SCALING);
|
const char *scale_hint = SDL_GetHint(SDL_HINT_VIDEO_WAYLAND_MODE_SCALING);
|
||||||
|
|
||||||
if (scale_hint) {
|
if (scale_hint) {
|
||||||
if (!SDL_strcasecmp(scale_hint, "aspect")) {
|
if (!SDL_strcasecmp(scale_hint, "stretch")) {
|
||||||
scale_mode = WAYLAND_MODE_SCALE_ASPECT;
|
scale_mode = WAYLAND_MODE_SCALE_STRETCH;
|
||||||
} else if (!SDL_strcasecmp(scale_hint, "none")) {
|
} else if (!SDL_strcasecmp(scale_hint, "none")) {
|
||||||
scale_mode = WAYLAND_MODE_SCALE_NONE;
|
scale_mode = WAYLAND_MODE_SCALE_NONE;
|
||||||
} else {
|
} else {
|
||||||
scale_mode = WAYLAND_MODE_SCALE_STRETCH;
|
scale_mode = WAYLAND_MODE_SCALE_ASPECT;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
scale_mode = WAYLAND_MODE_SCALE_STRETCH;
|
scale_mode = WAYLAND_MODE_SCALE_ASPECT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user