From: Simon Glass Date: Mon, 5 Jul 2021 22:32:47 +0000 (-0600) Subject: sandbox: Use hinting with the display X-Git-Url: http://git.dujemihanovic.xyz/html/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=350b1d3b6830bf7383b7df051521526eb2c0d8c4;p=u-boot.git 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 --- diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c index e264949481..bef5abd039 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,