mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-13 21:34:28 +00:00
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>