Files
emulator/src/hid_core
Zephyron a15719b21d hid_core: Add NpadCondition to shared memory to fix no-controller crash
Fix crash when launching games without a connected controller by adding
a global NpadCondition structure at offset 0x3E200 in HID shared memory.
Games read this structure on startup to verify controller state validity,
and crash with a userspace PANIC if the data is uninitialized.

The NpadCondition structure contains:
- is_initialized flag (set to 1)
- hold_type (controller orientation)
- is_valid flag (set to 1)

These fields are properly initialized when shared memory is created,
ensuring games see valid controller state data even before any
controllers are physically connected.

Fixes crash in The Legend of Zelda: Echoes of Wisdom and other titles
that validate controller state on startup.

Based on LotP's implementation of the NpadCondition structure.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-10-12 16:49:03 +10:00
..
2025-07-22 21:37:37 +07:00