diff --git a/tools/show-stylus.py b/tools/show-stylus.py index be734a4a..a24981ac 100755 --- a/tools/show-stylus.py +++ b/tools/show-stylus.py @@ -157,8 +157,15 @@ def load_data_files(): config = configparser.ConfigParser() config.read(path) for stylus_id in config.sections(): - sid = int(stylus_id, 16) - styli[sid] = config[stylus_id].get("Group", sid) + ids = stylus_id.split(":") + if len(ids) > 1: + vid, sid = map(lambda x: int(x, 16), ids) + else: + vid = 0x56a + sid = int(ids[0], 16) + # FIXME: vendor should be used here, let's do that when we figure out + # who needs it. + styli[sid] = config[stylus_id].get("Group", stylus_id) return styli