diff mbox series

[v2,1/1] sandbox: make SDL window resizable

Message ID 20201009214411.41143-1-xypron.glpk@gmx.de
State Accepted
Commit 18bca1f172473649aed03a9fa797c453b2a04ee4
Delegated to: Simon Glass
Headers show
Series [v2,1/1] sandbox: make SDL window resizable | expand

Commit Message

Heinrich Schuchardt Oct. 9, 2020, 9:44 p.m. UTC
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>
---
v2:
	Do not maximize the window.
---
 arch/sandbox/cpu/sdl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
2.28.0

Comments

Simon Glass Oct. 12, 2020, 3:35 a.m. UTC | #1
On Fri, 9 Oct 2020 at 15:44, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> 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>
> ---
> v2:
>         Do not maximize the window.
> ---
>  arch/sandbox/cpu/sdl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass Oct. 27, 2020, 1:01 a.m. UTC | #2
On Fri, 9 Oct 2020 at 15:44, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> 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>
> ---
> v2:
>         Do not maximize the window.
> ---
>  arch/sandbox/cpu/sdl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!
diff mbox series

Patch

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