From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Fri, 9 Oct 2020 21:44:11 +0000 (+0200)
Subject: sandbox: make SDL window resizable
X-Git-Tag: v2025.01-rc5-pxa1908~2146^2~54
X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/index.html?a=commitdiff_plain;h=18bca1f172473649aed03a9fa797c453b2a04ee4;p=u-boot.git

sandbox: make SDL window resizable

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>
---

diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
index 7dc3dab32e..d4dab36981 100644
--- a/arch/sandbox/cpu/sdl.c
+++ b/arch/sandbox/cpu/sdl.c
@@ -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());