Fix gamma correction for color not enabled on fresh install (#5225)

Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
This commit is contained in:
Copilot 2026-01-12 07:55:05 +01:00 committed by GitHub
parent 6e9dc181e1
commit d1d9dec402
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -507,8 +507,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
CJSON(strip.autoSegments, light[F("aseg")]); CJSON(strip.autoSegments, light[F("aseg")]);
CJSON(gammaCorrectVal, light["gc"]["val"]); // default 2.2 CJSON(gammaCorrectVal, light["gc"]["val"]); // default 2.2
float light_gc_bri = light["gc"]["bri"]; float light_gc_bri = light["gc"]["bri"] | 1.0f; // default to 1.0 (false)
float light_gc_col = light["gc"]["col"]; float light_gc_col = light["gc"]["col"] | gammaCorrectVal; // default to gammaCorrectVal (true)
if (light_gc_bri > 1.0f) gammaCorrectBri = true; if (light_gc_bri > 1.0f) gammaCorrectBri = true;
else gammaCorrectBri = false; else gammaCorrectBri = false;
if (light_gc_col > 1.0f) gammaCorrectCol = true; if (light_gc_col > 1.0f) gammaCorrectCol = true;