forked from kofal.net/zmk
fix(display): POSIX lvgl fixes (#2812)
fix(display): Do LVGL task processing in main on POSIX. An SDL/Zephyr bug prevents proper display when SDL calls are made from anything but the main thread, so add task handling in our simple main function when on POSIX. fix(usb): Compilation fix for 64-bit targets Properly handle differences in the size of `size_t` on 64-bit architectures. fix(display): Imply, but don't force, LVGL mono theme Some targets may be using color displays, so instead of forcing on the mono theme, merely imply it to default it
This commit is contained in:
@@ -12,7 +12,12 @@
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#if IS_ENABLED(CONFIG_ZMK_DISPLAY)
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include <lvgl.h>
|
||||
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
LOG_INF("Welcome to ZMK!\n");
|
||||
@@ -24,6 +29,16 @@ int main(void) {
|
||||
|
||||
#ifdef CONFIG_ZMK_DISPLAY
|
||||
zmk_display_init();
|
||||
|
||||
#if IS_ENABLED(CONFIG_ARCH_POSIX)
|
||||
// Workaround for an SDL display issue:
|
||||
// https://github.com/zephyrproject-rtos/zephyr/issues/71410
|
||||
while (1) {
|
||||
lv_task_handler();
|
||||
k_sleep(K_MSEC(10));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ZMK_DISPLAY */
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user