Actually shut down the old capture thread when stopping capture.
This commit is contained in:
parent
da46a02110
commit
f65dbcb8d6
1 changed files with 2 additions and 1 deletions
|
@ -142,6 +142,7 @@ class HidMachine(ThreadedStenotypeBase):
|
|||
keystate = BitString(N_BUTTONS)
|
||||
|
||||
def start_capture(self):
|
||||
self.finished.clear()
|
||||
self._initializing()
|
||||
# Enumerate all hid devices on the machine and if we find one with our
|
||||
# usage page and usage we try to connect to it.
|
||||
|
@ -164,10 +165,10 @@ class HidMachine(ThreadedStenotypeBase):
|
|||
self.start()
|
||||
|
||||
def stop_capture(self):
|
||||
super().stop_capture()
|
||||
if self._hid:
|
||||
self._hid.close()
|
||||
self._hid = None
|
||||
self._stopped()
|
||||
|
||||
@classmethod
|
||||
def get_option_info(cls):
|
||||
|
|
Loading…
Reference in a new issue