robustness improvements for image presets
prevent errors / crashes when drawing "i" images from a preset. - prevent out-of-bounds writing (segment smaller than image) - make sure that segment properties are cached correctly - always do "show" when strip was triggered (avoids lost frames)
This commit is contained in:
@@ -249,7 +249,7 @@ void IRAM_ATTR __attribute__((hot)) Segment::setPixelColorXY_fast(int x, int y,
|
||||
}
|
||||
|
||||
#if 0 // this is still a dangerous optimization
|
||||
if ((i < UINT_MAX) && sameColor && (call > 0) && (!transitional) && (mode != FX_MODE_2DSCROLLTEXT) && (ledsrgb[i] == CRGB(scaled_col))) return; // WLEDMM looks like nothing to do
|
||||
if ((i < UINT_MAX) && sameColor && (call > 0) && (!transitional) && (!freeze) && (mode != FX_MODE_2DSCROLLTEXT) && (ledsrgb[i] == CRGB(scaled_col))) return; // WLEDMM looks like nothing to do
|
||||
#endif
|
||||
|
||||
// handle reverse and transpose
|
||||
@@ -311,7 +311,7 @@ void IRAM_ATTR_YN Segment::setPixelColorXY(int x, int y, uint32_t col) //WLEDMM:
|
||||
}
|
||||
|
||||
#if 0 // this is a dangerous optimization
|
||||
if ((i < UINT_MAX) && sameColor && (call > 0) && (!transitional) && (mode != FX_MODE_2DSCROLLTEXT) && (ledsrgb[i] == CRGB(col))) return; // WLEDMM looks like nothing to do
|
||||
if ((i < UINT_MAX) && sameColor && (call > 0) && (!transitional) && (!freeze) && (mode != FX_MODE_2DSCROLLTEXT) && (ledsrgb[i] == CRGB(col))) return; // WLEDMM looks like nothing to do
|
||||
#endif
|
||||
|
||||
if (reverse ) x = cols - x - 1;
|
||||
|
||||
Reference in New Issue
Block a user