Fixes first pixel not being set in Stream FX (#4542)

* Fixes first pixel not being set
* added fix to Stream 2 as well
This commit is contained in:
Damian Schneider 2025-02-08 16:45:33 +01:00
parent cc4a4c4ae1
commit 2ac4d03160

View File

@ -1091,7 +1091,7 @@ uint16_t mode_running_random(void) {
unsigned z = it % zoneSize;
bool nzone = (!z && it != SEGENV.aux1);
for (unsigned i=SEGLEN-1; i > 0; i--) {
for (int i=SEGLEN-1; i >= 0; i--) {
if (nzone || z >= zoneSize) {
unsigned lastrand = PRNG16 >> 8;
int16_t diff = 0;
@ -1739,7 +1739,7 @@ uint16_t mode_random_chase(void) {
uint32_t color = SEGENV.step;
random16_set_seed(SEGENV.aux0);
for (unsigned i = SEGLEN -1; i > 0; i--) {
for (int i = SEGLEN -1; i >= 0; i--) {
uint8_t r = random8(6) != 0 ? (color >> 16 & 0xFF) : random8();
uint8_t g = random8(6) != 0 ? (color >> 8 & 0xFF) : random8();
uint8_t b = random8(6) != 0 ? (color & 0xFF) : random8();