feat(ImmichElias): 2x render 480x320 fullscreen bg, display detection, bottom-only UI, PSRAM
This commit is contained in:
@@ -471,13 +471,18 @@ 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;
|
||||
// Black screen fix: request small image to avoid OOM and internal low memory 8723 bytes
|
||||
// 320x240 decoded ~300KB, 240x180 ~172KB, 480x320 ~600KB (too large, causes black screen)
|
||||
// Use 240x180 for stability, widget still fills display for fullscreen bg effect
|
||||
int target_w = 240;
|
||||
int target_h = 180;
|
||||
// 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;
|
||||
ctx->img_w=target_w; ctx->img_h=target_h;
|
||||
ESP_LOGI(TAG, "Display detected %dx%d -> img request %dx%d (widget %dx%d fullscreen) BLACK SCREEN FIX", w,h,target_w,target_h,w,h);
|
||||
ESP_LOGI(TAG, "Display detected %dx%d -> img request %dx%d FULLSCREEN 2x", w,h,target_w,target_h);
|
||||
}
|
||||
|
||||
static void hide_chrome(AppCtx* ctx) {
|
||||
|
||||
Reference in New Issue
Block a user