[PATCH 1/1] sandbox: make SDL window resizable

Simon Glass sjg at chromium.org
Mon Oct 5 03:41:54 CEST 2020


Hi Heinrich,

On Mon, 28 Sep 2020 at 19:11, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> Without resizing the SDL window showed by
>
>     ./u-boot -D -l
>
> is not legible on a high resolution screen.
>
> Start with a maximized window and allow resizing.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  arch/sandbox/cpu/sdl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>

Have you troubled the --double_lcd option?

Does this have any effect on performance?

I actually don't like this as it makes the text hard to read, and full
screen is annoying. I wonder if this should be a flag?

> 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,9 @@ 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_MAXIMIZED |
> +                                             SDL_WINDOW_RESIZABLE);
>         if (!screen) {
>                 printf("Unable to initialise SDL screen: %s\n",
>                        SDL_GetError());
> --
> 2.28.0
>

Regards,
Simon


More information about the U-Boot mailing list