From af82cfe978080526fe85ab2c80a9224a8163e712 Mon Sep 17 00:00:00 2001 From: Yamagi Date: Tue, 2 Apr 2024 18:05:51 +0200 Subject: [PATCH] Switch the default for `vid_highdpiaware` to 1 when build against SDL3. With SDL3 the high dpi support is in much better shape than with SDL2. And for Wayland the experience on high dpi displays is generally better when the application is high dpi aware. --- doc/040_cvarlist.md | 10 ++++++---- src/client/vid/glimp_sdl3.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/040_cvarlist.md b/doc/040_cvarlist.md index 54e77c2c..c8380c9a 100644 --- a/doc/040_cvarlist.md +++ b/doc/040_cvarlist.md @@ -415,10 +415,12 @@ Set `0` by default. scaling factor of the underlying display. Example: The displays scaling factor is 1.25 and the user requests 1920x1080. The client will render at 1920\*1.25x1080\*1.25=2400x1350. - When set to `0` (the default) the client leaves the decision if the - window should be scaled to the underlying compositor. Scaling applied - by the compositor may introduce blur and sluggishness. - Currently high dpi awareness is only supported under Wayland. + When set to `0` the client leaves the decision if the window should + be scaled to the underlying compositor. Scaling applied by the + compositor may introduce blur and sluggishness. + Currently high dpi awareness is only supported under Wayland. + Defaults to `0` when build against SDL2 and to `1` when build against + SDL3. * **vid_maxfps**: The maximum framerate. *Note* that vsync (`r_vsync`) also restricts the framerate to the monitor refresh rate, so if vsync diff --git a/src/client/vid/glimp_sdl3.c b/src/client/vid/glimp_sdl3.c index 8c5ab122..3ab93389 100644 --- a/src/client/vid/glimp_sdl3.c +++ b/src/client/vid/glimp_sdl3.c @@ -402,7 +402,7 @@ GLimp_Init(void) { vid_displayrefreshrate = Cvar_Get("vid_displayrefreshrate", "-1", CVAR_ARCHIVE); vid_displayindex = Cvar_Get("vid_displayindex", "0", CVAR_ARCHIVE); - vid_highdpiaware = Cvar_Get("vid_highdpiaware", "0", CVAR_ARCHIVE); + vid_highdpiaware = Cvar_Get("vid_highdpiaware", "1", CVAR_ARCHIVE); vid_rate = Cvar_Get("vid_rate", "-1", CVAR_ARCHIVE); if (!SDL_WasInit(SDL_INIT_VIDEO))