diff options
-rwxr-xr-x | uinput_mng | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -229,9 +229,15 @@ class PhysDevices(dict): def upload_effect(self, effect): # upload the effect to all currently tracked devices for name, d in self.items(): + # is this a new effect or a change of an existing one + try: + upload_id = self._ff_effect_idmap[name][effect.id] + except LookupError: + upload_id = -1 + effect_d = ff.Effect(type = effect.type, direction = effect.direction, ff_trigger = effect.ff_trigger, - ff_replay = effect.ff_replay, u = effect.u, id = -1) + ff_replay = effect.ff_replay, u = effect.u, id = upload_id) did = d.upload_effect(effect_d) self._ff_effect_idmap[name][effect.id] = did |