Skip to content

Commit d1d9dec

Browse files
CopilotDedeHai
andauthored
Fix gamma correction for color not enabled on fresh install (#5225)
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
1 parent 6e9dc18 commit d1d9dec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wled00/cfg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
507507
CJSON(strip.autoSegments, light[F("aseg")]);
508508

509509
CJSON(gammaCorrectVal, light["gc"]["val"]); // default 2.2
510-
float light_gc_bri = light["gc"]["bri"];
511-
float light_gc_col = light["gc"]["col"];
510+
float light_gc_bri = light["gc"]["bri"] | 1.0f; // default to 1.0 (false)
511+
float light_gc_col = light["gc"]["col"] | gammaCorrectVal; // default to gammaCorrectVal (true)
512512
if (light_gc_bri > 1.0f) gammaCorrectBri = true;
513513
else gammaCorrectBri = false;
514514
if (light_gc_col > 1.0f) gammaCorrectCol = true;

0 commit comments

Comments
 (0)