From ae1d5ce3e7be3913313811fe686afdc8be2e0256 Mon Sep 17 00:00:00 2001 From: Rener Date: Sun, 29 Nov 2020 02:00:08 +0000 Subject: [PATCH] Check the click Adds a check to prevent sending full trigger input value unless the trigger click has been pressed (need exclude others controllers) --- scc/drivers/sc_dongle.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scc/drivers/sc_dongle.py b/scc/drivers/sc_dongle.py index ee9cafc93..9538574fb 100644 --- a/scc/drivers/sc_dongle.py +++ b/scc/drivers/sc_dongle.py @@ -185,6 +185,12 @@ def __repr__(self): def input(self, idata): + if idata.rtrig >= 253 and (idata.buttons & SCButtons.RT == 0): + idata = idata._replace(rtrig=253) + + if idata.ltrig >= 253 and (idata.buttons & SCButtons.LT == 0): + idata = idata._replace(ltrig=253) + old_state, self._old_state = self._old_state, idata if self.mapper: #if idata.buttons & SCButtons.LPAD: