From dda8f0dfd5066dffe2f1cde899201a95744fca8a Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Wed, 3 Jan 2024 04:49:19 +0100 Subject: [PATCH] early-access version 4045 --- README.md | 2 +- src/core/hle/service/hid/controllers/npad.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ee5781af4..067cd8d0b 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 4044. +This is the source code for early-access 4045. ## Legal Notice diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index e1d53f4e9..9de76aa6e 100755 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -120,11 +120,12 @@ void NPad::ControllerUpdate(Core::HID::ControllerTriggerType type, std::size_t c ControllerUpdate(Core::HID::ControllerTriggerType::Battery, controller_idx); return; } - if (controller_idx >= controller_data.size()) { - return; - } for (std::size_t aruid_index = 0; aruid_index < AruidIndexMax; aruid_index++) { + if (controller_idx >= controller_data[aruid_index].size()) { + return; + } + auto* data = applet_resource_holder.applet_resource->GetAruidDataByIndex(aruid_index); if (!data->flag.is_assigned) { @@ -464,7 +465,7 @@ void NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) { continue; } - for (std::size_t i = 0; i < controller_data.size(); ++i) { + for (std::size_t i = 0; i < controller_data[aruid_index].size(); ++i) { auto& controller = controller_data[aruid_index][i]; controller.shared_memory = &data->shared_memory_format->npad.npad_entry[i].internal_state;