From d08e2f016ea7e098284118d6eeba862dd594167e Mon Sep 17 00:00:00 2001 From: Ningyuan Li Date: Mon, 18 Mar 2024 00:35:24 +0900 Subject: [PATCH] force set minimum size for fullscreen mode --- src/app/ui/root.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/ui/root.c b/src/app/ui/root.c index 4534a9112..af14dca6f 100644 --- a/src/app/ui/root.c +++ b/src/app/ui/root.c @@ -288,7 +288,11 @@ SDL_Window *app_ui_create_window(app_ui_t *ui) { (int) lv_sdl_img_data_logo_96.data_len), SDL_TRUE); SDL_SetWindowIcon(win, winicon); SDL_FreeSurface(winicon); - SDL_SetWindowMinimumSize(win, 640, 480); + if (app_configuration->fullscreen) { + SDL_SetWindowMinimumSize(win, win_width, win_height); + } else { + SDL_SetWindowMinimumSize(win, 640, 480); + } int w = 0, h = 0; SDL_GetWindowSize(win, &w, &h); SDL_assert_release(w > 0 && h > 0);