aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-05 16:32:47 -0600
committerSimon Glass <sjg@chromium.org>2021-07-21 10:27:34 -0600
commit350b1d3b6830bf7383b7df051521526eb2c0d8c4 (patch)
tree2f3913338cca13f7e63d3ce8c626fef68474dec0 /arch/sandbox
parentfcb7e31082c8abf77f5efac5920093f3bcb5d8ca (diff)
downloadu-boot-350b1d3b6830bf7383b7df051521526eb2c0d8c4.zip
u-boot-350b1d3b6830bf7383b7df051521526eb2c0d8c4.tar.gz
u-boot-350b1d3b6830bf7383b7df051521526eb2c0d8c4.tar.bz2
sandbox: Use hinting with the display
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>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/cpu/sdl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
index e264949..bef5abd 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,