All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 1/1] sandbox: make SDL window resizable
Date: Thu, 8 Oct 2020 11:46:12 +0200	[thread overview]
Message-ID: <d49a6457-a872-ee71-c210-8886588f7f50@gmx.de> (raw)
In-Reply-To: <CAPnjgZ2bxkMr4_-JUyEc7u611CeMFFJ8Y5BRht5Rbb9sL4fbgw@mail.gmail.com>

On 05.10.20 03:41, Simon Glass wrote:
> Hi Heinrich,
>
> On Mon, 28 Sep 2020 at 19:11, 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.
>>
>> Start with a maximized window and allow resizing.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> ---
>>  arch/sandbox/cpu/sdl.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>
> Have you troubled the --double_lcd option?

That looks better.

This option is not documented in doc/arch/sandbox.rst.

>
> Does this have any effect on performance?

With --double_lcd you are already doing a resize operation. I could not
observe any performance loss for a maximized window. The BitBlt
operations in X11 are well accelerated by current GPUs.

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

I understand that you do not want the window maximized. But is anything
wrong about making the window resizable (SDL_WINDOW_RESIZABLE)?

Shall I update the patch accordingly?

Best regards

Heinrich

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

  reply	other threads:[~2020-10-08  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  1:11 [PATCH 1/1] sandbox: make SDL window resizable Heinrich Schuchardt
2020-10-05  1:41 ` Simon Glass
2020-10-08  9:46   ` Heinrich Schuchardt [this message]
2020-10-09 17:23     ` Simon Glass
2020-10-09 21:43       ` Heinrich Schuchardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d49a6457-a872-ee71-c210-8886588f7f50@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.