arduino hid: fixed mouse movement on windows

This commit is contained in:
Devaev Maxim
2019-10-05 02:42:06 +03:00
parent f5bbfeb8b5
commit da660d02cd
5 changed files with 35 additions and 1 deletions

18
hid/patch.py Normal file
View File

@@ -0,0 +1,18 @@
from os.path import join
from os.path import exists
Import("env")
# =====
env_path = join(env["PROJECTLIBDEPS_DIR"], env["PIOENV"])
flag_path = join(env_path, ".patched")
if not exists(flag_path):
env.Execute(f"patch -p1 -d {join(env_path, 'HID-Project_ID523')} < {join('patches', 'absmouse.patch')}")
def touch_flag(*_, **__) -> None:
with open(flag_path, "w") as flag_file:
pass
env.Execute(touch_flag)