From d7b966cb6b1f15252462df16e3a54bc0e6c50002 Mon Sep 17 00:00:00 2001 From: Sunguk Lee Date: Tue, 20 Aug 2019 04:55:25 +0900 Subject: [PATCH] Fix empty type_codes if call `DeviceManager` outside of the module, `self.code['type_codes']` could be always empty --- inputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputs.py b/inputs.py index b1f8fb1..e5cbe4b 100644 --- a/inputs.py +++ b/inputs.py @@ -1299,7 +1299,7 @@ def convert_timeval(seconds_since_epoch): EVENT_MAP = ( ('types', EVENT_TYPES), - ('type_codes', ((value, key) for key, value in EVENT_TYPES)), + ('type_codes', tuple((value, key) for key, value in EVENT_TYPES)), ('wincodes', WINCODES), ('specials', SPECIAL_DEVICES), ('xpad', XINPUT_MAPPING),