]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: make SDL window resizable
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 9 Oct 2020 21:44:11 +0000 (23:44 +0200)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Oct 2020 20:42:18 +0000 (14:42 -0600)
Without resizing the SDL window showed by

    ./u-boot -D -l

is not legible on a high resolution screen.

Allow resizing the window

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/sdl.c

index 7dc3dab32efb7a06223e6519eb755b87a61736b2..d4dab3698161c2ac08e5c35b616cc6e90398d21c 100644 (file)
@@ -127,7 +127,8 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp,
        sdl.pitch = sdl.width * sdl.depth / 8;
        SDL_Window *screen = SDL_CreateWindow("U-Boot", SDL_WINDOWPOS_UNDEFINED,
                                              SDL_WINDOWPOS_UNDEFINED,
-                                             sdl.vis_width, sdl.vis_height, 0);
+                                             sdl.vis_width, sdl.vis_height,
+                                             SDL_WINDOW_RESIZABLE);
        if (!screen) {
                printf("Unable to initialise SDL screen: %s\n",
                       SDL_GetError());