diff --git a/src/app/ui/root.c b/src/app/ui/root.c index 45e5a707..faa3ca95 100644 --- a/src/app/ui/root.c +++ b/src/app/ui/root.c @@ -278,7 +278,7 @@ void ui_cb_destroy_fragment(lv_event_t *e) { } SDL_Window *app_ui_create_window(app_ui_t *ui) { - Uint32 win_flags = SDL_WINDOW_RESIZABLE; + Uint32 win_flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI; int win_x = SDL_WINDOWPOS_UNDEFINED, win_y = SDL_WINDOWPOS_UNDEFINED, win_width = 1920, win_height = 1080; if (app_configuration->fullscreen) { diff --git a/src/app/ui/ui_input.c b/src/app/ui/ui_input.c index eb55a093..bf5ecde7 100644 --- a/src/app/ui/ui_input.c +++ b/src/app/ui/ui_input.c @@ -47,6 +47,11 @@ void app_ui_input_deinit(app_ui_input_t *input) { lv_indev_delete(input->wheel.indev); lv_indev_delete(input->button.indev); + input->key.indev = NULL; + input->pointer.indev = NULL; + input->wheel.indev = NULL; + input->button.indev = NULL; + _lv_ll_clear(&input->modal_groups); } @@ -131,7 +136,13 @@ static void app_input_populate_group(app_ui_input_t *input) { if (!group) { group = lv_group_get_default(); } - lv_indev_set_group(input->key.indev, group); - lv_indev_set_group(input->wheel.indev, group); - lv_indev_set_group(input->button.indev, group); + if (input->key.indev) { + lv_indev_set_group(input->key.indev, group); + } + if (input->wheel.indev) { + lv_indev_set_group(input->wheel.indev, group); + } + if (input->button.indev) { + lv_indev_set_group(input->button.indev, group); + } } \ No newline at end of file