Skip to content

Commit 4f688a4

Browse files
committed
fixed init sequence bug
1 parent 56d7d84 commit 4f688a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wled00/FXparticleSystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ ParticleSystem2D::ParticleSystem2D(uint32_t width, uint32_t height, uint32_t num
3030
usedParticles = numParticles; // use all particles by default
3131
advPartProps = nullptr; //make sure we start out with null pointers (just in case memory was not cleared)
3232
advPartSize = nullptr;
33-
updatePSpointers(isadvanced, sizecontrol); // set the particle and sources pointer (call this before accessing sprays or particles)
3433
setMatrixSize(width, height);
34+
updatePSpointers(isadvanced, sizecontrol); // set the particle and sources pointer (call this before accessing sprays or particles)
3535
setWallHardness(255); // set default wall hardness to max
3636
setWallRoughness(0); // smooth walls by default
3737
setGravity(0); //gravity disabled by default
@@ -1140,8 +1140,8 @@ ParticleSystem1D::ParticleSystem1D(uint32_t length, uint32_t numberofparticles,
11401140
usedParticles = numParticles; // use all particles by default
11411141
advPartProps = nullptr; //make sure we start out with null pointers (just in case memory was not cleared)
11421142
//advPartSize = nullptr;
1143-
updatePSpointers(isadvanced); // set the particle and sources pointer (call this before accessing sprays or particles)
11441143
setSize(length);
1144+
updatePSpointers(isadvanced); // set the particle and sources pointer (call this before accessing sprays or particles)
11451145
setWallHardness(255); // set default wall hardness to max
11461146
setGravity(0); //gravity disabled by default
11471147
setParticleSize(0); // 1 pixel size by default

0 commit comments

Comments
 (0)