fix(ImmichElias): black screen fix, 320x240 request for PSRAM stability (480x320 OOM), fullscreen widget 480x320 bg, bottom-only UI, tap toggle

This commit is contained in:
Adolfo
2026-07-25 16:14:34 -04:00
parent a2bb8e5132
commit d06f8ddbb5
+6 -11
View File
@@ -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) {