mouse input range

This commit is contained in:
Devaev Maxim
2021-03-26 05:19:02 +03:00
parent 7f23f82a0d
commit e24228b875
5 changed files with 40 additions and 11 deletions

View File

@@ -59,7 +59,7 @@ def main(argv: Optional[List[str]]=None) -> None:
if config.kvmd.msd.type == "otg":
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"])
hid_kwargs = config.kvmd.hid._unpack(ignore=["type", "keymap", "mouse_x_range", "mouse_y_range"])
if config.kvmd.hid.type == "otg":
hid_kwargs["udc"] = config.otg.udc # XXX: Small crutch to pass UDC to the plugin
@@ -104,6 +104,8 @@ def main(argv: Optional[List[str]]=None) -> None:
sync_chunk_size=config.server.sync_chunk_size,
keymap_path=config.hid.keymap,
mouse_x_range=(config.hid.mouse_x_range.min, config.hid.mouse_x_range.max),
mouse_y_range=(config.hid.mouse_y_range.min, config.hid.mouse_y_range.max),
stream_forever=config.streamer.forever,
).run(**config.server._unpack(ignore=["heartbeat", "sync_chunk_size"]))