mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 15:56:01 +00:00
fix(input): Steam finds a DualShock or DualSense chosen mid-session (#2942)
* fix(input): Steam finds a DualShock or DualSense chosen mid-session Android lets an app open a uevent netlink socket but not join its multicast groups, and libudev joins none when no udev daemon runs, so the udev monitors Steam's SDL opens heard nothing and the pad switch's add and remove events reached no one. SDL only noticed a new PlayStation pad when the old one happened to fail a read. A monitor left without a subscription is now swapped for the session's stand-in under the same descriptor, so it receives the injected events. * test(preload): stub the udev monitor bind hook in the CDP guard build
This commit is contained in:
1 parent
d5c83eae15
commit
d7f43c26cd
4 files changed
+151
-1
No files matched your search
@@ -19,7 +19,8 @@ class CdpGuardTest(unittest.TestCase):
|
||||
subprocess.run(["cc", "-shared", "-fPIC", "-O2", str(SOURCE), str(SOURCE.parent / "binfmt.c"), str(SOURCE.parent / "webhelper.c"),
|
||||
str(Path(__file__).with_name("netlink_stubs.c")), "-x", "c", "-", "-ldl",
|
||||
"-o", str(cls.library)],
|
||||
input=b"int dd_udevmon_stand_in(int fd) { return 0; }", check=True, capture_output=True)
|
||||
input=b"int dd_udevmon_stand_in(int fd) { return 0; }\n"
|
||||
b"int dd_udevmon_bind(int fd, const void *addr, unsigned len, void *real, int *rc) { return 0; }", check=True, capture_output=True)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
|
||||
Reference in new issue
Block a user