diff mbox series

[09/22] sandbox: Use hinting with the display

Message ID 20210705223300.2139971-8-sjg@chromium.org
State Accepted
Commit 350b1d3b6830bf7383b7df051521526eb2c0d8c4
Delegated to: Simon Glass
Headers show
Series Various fixes and enhancements | expand

Commit Message

Simon Glass July 5, 2021, 10:32 p.m. UTC
SDL provides a hinting feature which provides a higher-quality image
with the double-display option (-K). Enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/cpu/sdl.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Simon Glass July 17, 2021, 8:39 p.m. UTC | #1
SDL provides a hinting feature which provides a higher-quality image
with the double-display option (-K). Enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/cpu/sdl.c | 3 +++
 1 file changed, 3 insertions(+)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
index e2649494818..bef5abd039d 100644
--- a/arch/sandbox/cpu/sdl.c
+++ b/arch/sandbox/cpu/sdl.c
@@ -123,6 +123,9 @@  int sandbox_sdl_init_display(int width, int height, int log2_bpp,
 		sdl.vis_height = sdl.height;
 	}
 
+	if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1"))
+		printf("Unable to init hinting: %s", SDL_GetError());
+
 	sdl.depth = 1 << log2_bpp;
 	sdl.pitch = sdl.width * sdl.depth / 8;
 	SDL_Window *screen = SDL_CreateWindow("U-Boot", SDL_WINDOWPOS_UNDEFINED,