From f9a2099240e31eece1ce24cb1eb06eb4a80df2a1 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sun, 9 Nov 2025 20:30:43 +0100 Subject: [PATCH] always use same GifDecoder initialization Removed conditional compilation for GifDecoder based on PSRAM availability. After inspecting the library code, it became clear that any parameter changes for GifDecoder will not impact memory needs - decoder.alloc() always requires 24KB. --- wled00/image_loader.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/wled00/image_loader.cpp b/wled00/image_loader.cpp index d8c21243..3a8fd99d 100644 --- a/wled00/image_loader.cpp +++ b/wled00/image_loader.cpp @@ -11,11 +11,7 @@ static File file; static char lastFilename[34] = "/"; -#if !defined(BOARD_HAS_PSRAM) - static GifDecoder<256,256,11,true> decoder; // WLEDMM use less RAM on boards without PSRAM - avoids crashes due to out-of-memory -#else - static GifDecoder<320,320,12,true> decoder; -#endif +static GifDecoder<320,320,12,true> decoder; // this creates the basic object; parameter lzwMaxBits is not used; decoder.alloc() always allocated "everything else" = 24Kb static bool gifDecodeFailed = false; static unsigned long lastFrameDisplayTime = 0, currentFrameDelay = 0; @@ -209,4 +205,4 @@ void endImagePlayback(Segment *seg) { DEBUG_PRINTLN(F("Image playback ended")); } -#endif \ No newline at end of file +#endif