[hid_core] Fix a specific case where all controllers get disconnected by certain games (#2759)

There's a bug in some games where all controllers get disconnected. This fixes those specific cases where controllers set to Handheld or Player 1 need to remain connected.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2759
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
This commit is contained in:
MaranBr
2025-10-17 22:24:38 +02:00
committed by crueter
parent de46b8e817
commit 9c7ed0f59d
2 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -589,7 +589,7 @@ private:
std::array<VibrationValue, 2> last_vibration_value{DEFAULT_VIBRATION_VALUE,
DEFAULT_VIBRATION_VALUE};
std::array<std::chrono::steady_clock::time_point, 2> last_vibration_timepoint{};
std::array<bool, HIDCore::available_controllers - 2> controller_connected{};
std::array<bool, HIDCore::available_controllers> controller_connected{};
// Temporary values to avoid doing changes while the controller is in configuring mode
NpadStyleIndex tmp_npad_type{NpadStyleIndex::None};