feat: drive native DualSense haptics from Switch HD rumble
This commit is contained in:
parent
0c626fb3b3
commit
6188fcb517
23 changed files with 1836 additions and 182 deletions
31
tests/test_switch_hd_rumble_synth_native.py
Normal file
31
tests/test_switch_hd_rumble_synth_native.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import shutil
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_switch_hd_rumble_synth_native(tmp_path: Path) -> None:
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
compiler = shutil.which("c++") or shutil.which("g++")
|
||||
assert compiler is not None, "a host C++ compiler is required"
|
||||
|
||||
executable = tmp_path / "switch_hd_rumble_synth_test"
|
||||
subprocess.run(
|
||||
[
|
||||
compiler,
|
||||
"-std=c++17",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
"-pedantic",
|
||||
f"-I{root / 'src' / 'firmware'}",
|
||||
str(root / "src" / "firmware" / "input" / "switch_hd_rumble_synth.cpp"),
|
||||
str(root / "tests" / "switch_hd_rumble_synth_test.cpp"),
|
||||
"-o",
|
||||
str(executable),
|
||||
],
|
||||
check=True,
|
||||
cwd=root,
|
||||
)
|
||||
subprocess.run([str(executable)], check=True, cwd=root, timeout=15)
|
||||
Loading…
Add table
Add a link
Reference in a new issue