sandbox: sdl: Add an option to double the screen size

On high-DPI displays U-Boot's LCD window can look very small. Add a
-K flag to expand it to make things easier to read, while still using
the existing resolution internally.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
Simon Glass 2020-02-03 07:36:13 -07:00
parent 96d0cd4604
commit 6be88c7282
5 changed files with 36 additions and 6 deletions

View file

@ -17,10 +17,13 @@
* @height Window height in pixels
* @log2_bpp: Log to base 2 of the number of bits per pixel. So a 32bpp
* display will pass 5, since 2*5 = 32
* @double_size: true to double the visible size in each direction for high-DPI
* displays
* @return 0 if OK, -ENODEV if no device, -EIO if SDL failed to initialize
* and -EPERM if the video failed to come up.
*/
int sandbox_sdl_init_display(int width, int height, int log2_bpp);
int sandbox_sdl_init_display(int width, int height, int log2_bpp,
bool double_size);
/**
* sandbox_sdl_sync() - Sync current U-Boot LCD frame buffer to SDL
@ -78,8 +81,8 @@ int sandbox_sdl_sound_stop(void);
int sandbox_sdl_sound_init(int rate, int channels);
#else
static inline int sandbox_sdl_init_display(int width, int height,
int log2_bpp)
static inline int sandbox_sdl_init_display(int width, int height, int log2_bpp,
bool double_size)
{
return -ENODEV;
}