From d06f8ddbb517f14a86a6d9e187c63de86361e80c Mon Sep 17 00:00:00 2001 From: Adolfo Date: Sat, 25 Jul 2026 16:14:34 -0400 Subject: [PATCH] fix(ImmichElias): black screen fix, 320x240 request for PSRAM stability (480x320 OOM), fullscreen widget 480x320 bg, bottom-only UI, tap toggle --- Apps/ImmichElias/main/Source/main.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Apps/ImmichElias/main/Source/main.c b/Apps/ImmichElias/main/Source/main.c index 0b1d741..42582b4 100644 --- a/Apps/ImmichElias/main/Source/main.c +++ b/Apps/ImmichElias/main/Source/main.c @@ -471,18 +471,13 @@ static void detect_display_size(AppCtx* ctx, lv_obj_t* parent) { if (dw2>0 && dh2>0) { w=dw2; h=dh2; } } ctx->disp_w=w; ctx->disp_h=h; - // 2x render: request full display resolution for sharper image, widget fills display - // For 480x320 display, request 480x320 (2x of 240x180) - decoded ~600KB, needs PSRAM - // Bottom-only UI saves ~90KB internal, so 480x320 should now work without black screen - // Fallback to 320x240 if proxy fails - int target_w = w; - int target_h = h; - if (target_w>480) target_w=480; - if (target_h>320) target_h=320; - if (target_w<120) target_w=FALLBACK_W; - if (target_h<120) target_h=FALLBACK_H; + // Black screen fix: 480x320 PNG decodes ~600KB, causes internal low 8723 bytes -> decoder fail -> black screen + // Use 320x240 (decoded ~300KB) for stability, widget still fullscreen 480x320 background + // 2x would be 480x320 but OOM, so keep 320x240 as best stable, or 240x180 for extra safety + int target_w = 320; + int target_h = 240; ctx->img_w=target_w; ctx->img_h=target_h; - ESP_LOGI(TAG, "Display detected %dx%d -> img request %dx%d FULLSCREEN 2x", w,h,target_w,target_h); + ESP_LOGI(TAG, "Display detected %dx%d -> img request %dx%d FULLSCREEN bg (320x240 stable, 480x320=2x OOM)", w,h,target_w,target_h); } static void hide_chrome(AppCtx* ctx) {