From 232a33bd4904c71b266018142edf07ed15743b73 Mon Sep 17 00:00:00 2001
From: jgmdev <[EMAIL REDACTED]>
Date: Mon, 24 Mar 2025 22:46:43 -0400
Subject: [PATCH] Quirk: pragtical editor supports hidpi wayland
Add quirk for Pragtical Code Editor to use
SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY=0 since it handles high
DPI properly.
---
src/sdl2_compat.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index df5e31c..11809d3 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -483,6 +483,9 @@ static QuirkEntryType quirks[] = {
{ "moonlight", SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY, "0" },
{ "moonlight-qt", SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY, "0" },
+ /* Pragtical code editor supports high DPI properly under Wayland */
+ { "pragtical", SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY, "0" },
+
/* Tauon Music Box supports high DPI properly under Wayland.
* It also pumps events off the main thread, which causes crashes in libdecor.
* It draws its own window border, so we don't actually need window decorations.
@@ -6317,7 +6320,7 @@ SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 form
if (!surface) {
return -1;
}
-
+
if (!format) {
target = SDL3_GetRenderTarget(renderer);
if (target) {