Repository navigation
nn::hid::EnableUnintendedHomeButtonInputProtection is answered by the host and logged: Drag x Drive no longer crashes at sdk+0x63ce10 as player 1's Joy-Con 2 joins - #1921
Conversation
… host and logged: Drag x Drive no longer crashes at sdk+0x63ce10 as player 1's Joy-Con 2 joins The SDK's own sets a flag through the hid service, which the host does not serve, and called through the null session. The guard keeps a Home press made by accident on that controller from leaving the game; the host handles Home itself (home_quit.h). Docs: services.md, Home button protection on a Switch 2 controller.
…on the Mac with a pair of Joy-Con 2s at the game's own 30 fps: its profile, note and table row (it needs PR seedds#1609 to boot, and PR seedds#1921, the first commit of this branch)
…e game set per npad, off by default: Nintendo Switch Sports Resort asks it at boot
|
Added a second commit: |
…e no longer crashes at sdk+0x63ce10 as player 1's Joy-Con 2 joins, and Nintendo Switch Sports Resort no longer aborts at boot (PR #1921) EnableUnintendedHomeButtonInputProtection records the setting per npad (in id_bit's bits) and logs it; IsUnintendedHomeButtonInputProtectionEnabled answers what the game set, off by default. The SDK's own implementations go through the hid service, which the host does not serve: the setter called through the null session, the question aborted on Result 0x58cca (sdk+0x6ca40c). The host handles Home itself (home_quit.h), so the setting changes nothing else. Docs: services.md, Home button protection on a Switch 2 controller; t_hid checks the setting per npad. Co-authored-by: FifteenPen <354289956+FifteenPen@users.noreply.github.com>
|
Landed on main as 30c9b16 (with you as co-author), thank you. One change: the setting is stored in |
Thank you - I submitted both! |
… it), seedds#1921 on main as 30c9b16, seedds#1561 explained (aborts after the safety screen without it), its six refused shaders built by seedds#2264
What and why
Drag x Drive (
040041601D83A000, v196608, SDK 20) crashes about 43 s in, as player 1's Joy-Con 2 pair joins:The game calls
nn::hid::EnableUnintendedHomeButtonInputProtection(const NpadIdType&, bool)for the controller (main+0x2c80c4): a Switch 2 SDK guard against a Home press made by accident on it. The SDK's own implementation sets the flag through the hid service, which the host does not serve, and calls through the null session atsdk+0x63ce10. The function returns nothing.The change answers it in
hle_hid.c(HLE_FORCE) and logs the npad and the setting (hid: EnableUnintendedHomeButtonInputProtection npad 0 on). The host handles the Home button itself (home_quit.h), so nothing else changes. Only a game that imports the function binds it.Docs: a reference entry, Home button protection on a Switch 2 controller, and its line in the symptom index. Drag x Drive's profile and note are a pull request of their own, to follow.
Checked
make -C dm/host/tests GAME=010015100B514000 run: passes.python3 -m unittest dm/tools/tests/test_docs.py dm/tools/tests/test_env_switches.py,python3 dm/tools/docs_symptoms.py.dm/tools/lint_c.py tidy(LLVM 23.1.4) ondm/host/hle_hid.c: 0 file/check pairs above the baseline.040041601D83A000, v196608), a Mac app from a provisional profile (the NSP script's survey), with a left and a right Joy-Con 2 over Bluetooth LE. That tree was main db206a4 with the Joy-Con 2 work since landed on main (36e6e4a, 413e880, a342d64, 8c436e3), host/input: keyboard, mouse and trackpad on the iPad, Mac mouse camera #1490 and NVN: account for four-byte direct indexed draws using control memory #1609:regress.py impact: no game with a usage manifest reaches the change (Breath of the Wild, Pokémon Scarlet, Tears of the Kingdom and Hades: not affected); it binds only where a game imports the function, soregress.py checkwas not run.Docs
docs/reference/<subsystem>.mdentry, andpython3 dm/tools/docs_symptoms.pywas run (the symptom index)