diff options
author | Devaev Maxim <[email protected]> | 2020-10-03 09:58:15 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-10-03 09:58:15 +0300 |
commit | 877a0b844100c51ff96f19f4a00abed02dadec89 (patch) | |
tree | 0c4b068707931926ecdaab6a9563be9330616b34 /kvmd/apps | |
parent | 971eb1c203e5dfacd55b7c1e215071b3ebd0c153 (diff) |
processing udc state
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/kvmd/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kvmd/apps/kvmd/__init__.py b/kvmd/apps/kvmd/__init__.py index 24a09560..5e99919d 100644 --- a/kvmd/apps/kvmd/__init__.py +++ b/kvmd/apps/kvmd/__init__.py @@ -56,12 +56,16 @@ def main(argv: Optional[List[str]]=None) -> None: msd_kwargs = config.kvmd.msd._unpack(ignore=["type"]) if config.kvmd.msd.type == "otg": - msd_kwargs["gadget"] = config.otg.gadget # XXX: Small crutch to pass gadget name to plugin + msd_kwargs["gadget"] = config.otg.gadget # XXX: Small crutch to pass gadget name to the plugin + + hid_kwargs = config.kvmd.hid._unpack(ignore=["type", "keymap"]) + if config.kvmd.hid.type == "otg": + hid_kwargs["udc"] = config.otg.udc # XXX: Small crutch to pass UDC to the plugin global_config = config config = config.kvmd - hid = get_hid_class(config.hid.type)(**config.hid._unpack(ignore=["type", "keymap"])) + hid = get_hid_class(config.hid.type)(**hid_kwargs) streamer = Streamer(**config.streamer._unpack(ignore=["forever"])) KvmdServer( |