-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch needed for native_posix display zoom from upstream Zephyr. …
…Set zoom to 200%.
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,5 @@ CONFIG_DEBUG_OPTIMIZATIONS=y | |
CONFIG_SPI_FLASH_LOADER=n | ||
|
||
CONFIG_BT_EXT_ADV=n | ||
|
||
CONFIG_SDL_DISPLAY_ZOOM_PCT=200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From ccd843ecbd6b670cfa296150bee4999580e8350b Mon Sep 17 00:00:00 2001 | ||
From: Jakob Krantz <[email protected]> | ||
Date: Fri, 22 Dec 2023 15:13:01 +0100 | ||
Subject: [PATCH] driver: display: sdl: Fix input together with | ||
SDL_DISPLAY_ZOOM_PCT | ||
|
||
Using SDL_DISPLAY_ZOOM_PCT would cause mouse pointer/touch input | ||
to not click at the correct position. | ||
|
||
Signed-off-by: Jakob Krantz <[email protected]> | ||
--- | ||
drivers/display/display_sdl_bottom.c | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/drivers/display/display_sdl_bottom.c b/drivers/display/display_sdl_bottom.c | ||
index 92c09f36fcd9b6..bfeb70a8dba93f 100644 | ||
--- a/drivers/display/display_sdl_bottom.c | ||
+++ b/drivers/display/display_sdl_bottom.c | ||
@@ -29,6 +29,8 @@ int sdl_display_init_bottom(uint16_t height, uint16_t width, uint16_t zoom_pct, | ||
return -1; | ||
} | ||
|
||
+ SDL_RenderSetLogicalSize(*renderer, width, height); | ||
+ | ||
*texture = SDL_CreateTexture(*renderer, SDL_PIXELFORMAT_ARGB8888, | ||
SDL_TEXTUREACCESS_STATIC, width, height); | ||
if (*texture == NULL) { |