add my gui

This commit is contained in:
kingham
2025-09-11 17:02:52 +08:00
parent 04323fcb10
commit e879bde4c1
4 changed files with 12 additions and 9 deletions

View File

@@ -30,8 +30,8 @@ static void lv_linux_disp_init(void)
#elif LV_USE_SDL
static void lv_linux_disp_init(void)
{
const int width = atoi(getenv("LV_SDL_VIDEO_WIDTH") ? : "800");
const int height = atoi(getenv("LV_SDL_VIDEO_HEIGHT") ? : "480");
const int width = atoi(getenv("LV_SDL_VIDEO_WIDTH") ? : "240");
const int height = atoi(getenv("LV_SDL_VIDEO_HEIGHT") ? : "240");
lv_sdl_window_create(width, height);
}
@@ -45,6 +45,8 @@ static void lv_linux_indev_init(void)
#error Unsupported configuration
#endif
#include "./GUI/ui.h"
int main(void)
{
lv_init();
@@ -55,9 +57,11 @@ int main(void)
lv_linux_indev_init();
/*Create a Demo*/
lv_demo_widgets();
// lv_demo_widgets();
// lv_demo_widgets_start_slideshow();
ui_init();
/*Handle LVGL tasks*/
while(1) {
lv_timer_handler();