Skip to content

Commit d01319b

Browse files
committed
Bug: SingleEffectManager should run effect module we supply in the initializer
1 parent 0597a02 commit d01319b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

demosys/effects/managers.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ def pre_load(self):
6666
"""
6767
effect_list = [cfg.cls() for name, cfg in effects.effects.items()]
6868

69-
# If an effect want't specified in the initializer we grab the first one
70-
if not self.active_effect:
71-
self.active_effect = effect_list[0]
72-
else:
73-
# Otherwise we look for an effect with the name
69+
# If an effect was specified in the initializer, find it
70+
if self.effect_module:
7471
for effect in effect_list:
7572
if effect.name == self.effect_module:
7673
self.active_effect = effect
74+
else:
75+
# Otherwise we look just grab the first effect
76+
self.active_effect = effect_list[0]
7777

7878
if not self.active_effect:
7979
print("Cannot find effect '{}'".format(self.active_effect))
@@ -90,7 +90,8 @@ def draw(self, time, frametime, target):
9090
self.active_effect.draw(time, frametime, target)
9191

9292
def key_event(self, key, scancode, action, mods):
93-
print("SingleEffectManager:key_event", key, scancode, action, mods)
93+
# print("SingleEffectManager:key_event", key, scancode, action, mods)
94+
pass
9495

9596

9697
class TrackerEffectManager(BaseEffectManger):

0 commit comments

Comments
 (0)