]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Use hinting with the display
authorSimon Glass <sjg@chromium.org>
Mon, 5 Jul 2021 22:32:47 +0000 (16:32 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 21 Jul 2021 16:27:34 +0000 (10:27 -0600)
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

index e2649494818d2ee0523d6f404b2e80130f54dd4c..bef5abd039d7ef448d708a6f7104141e54c6fcc0 100644 (file)
@@ -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,