aboutsummaryrefslogtreecommitdiff
path: root/uinput_mng
diff options
context:
space:
mode:
Diffstat (limited to 'uinput_mng')
-rwxr-xr-xuinput_mng8
1 files changed, 7 insertions, 1 deletions
diff --git a/uinput_mng b/uinput_mng
index b2e9a7a..2abdbbf 100755
--- a/uinput_mng
+++ b/uinput_mng
@@ -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