summaryrefslogtreecommitdiffstats
path: root/src/hid_core/resources/npad
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2024-02-05 23:59:13 +0100
committergerman77 <juangerman-13@hotmail.com>2024-02-06 00:17:21 +0100
commit372897aac42192bb0290e7ac74e1ae8d15f53a55 (patch)
tree7cbd5f742c67fcfadd6d34ae807d940d178c1da2 /src/hid_core/resources/npad
parentMerge pull request #12905 from liamwhite/hwc-release (diff)
downloadyuzu-372897aac42192bb0290e7ac74e1ae8d15f53a55.tar
yuzu-372897aac42192bb0290e7ac74e1ae8d15f53a55.tar.gz
yuzu-372897aac42192bb0290e7ac74e1ae8d15f53a55.tar.bz2
yuzu-372897aac42192bb0290e7ac74e1ae8d15f53a55.tar.lz
yuzu-372897aac42192bb0290e7ac74e1ae8d15f53a55.tar.xz
yuzu-372897aac42192bb0290e7ac74e1ae8d15f53a55.tar.zst
yuzu-372897aac42192bb0290e7ac74e1ae8d15f53a55.zip
Diffstat (limited to 'src/hid_core/resources/npad')
-rw-r--r--src/hid_core/resources/npad/npad.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp
index fe3fdc5cd..053625b55 100644
--- a/src/hid_core/resources/npad/npad.cpp
+++ b/src/hid_core/resources/npad/npad.cpp
@@ -131,7 +131,7 @@ void NPad::ControllerUpdate(Core::HID::ControllerTriggerType type, std::size_t c
auto* data = applet_resource_holder.applet_resource->GetAruidDataByIndex(aruid_index);
- if (!data->flag.is_assigned) {
+ if (data == nullptr || !data->flag.is_assigned) {
continue;
}
@@ -463,13 +463,13 @@ void NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
std::scoped_lock lock{*applet_resource_holder.shared_mutex};
for (std::size_t aruid_index = 0; aruid_index < AruidIndexMax; ++aruid_index) {
const auto* data = applet_resource_holder.applet_resource->GetAruidDataByIndex(aruid_index);
- const auto aruid = data->aruid;
- if (!data->flag.is_assigned) {
+ if (data == nullptr || !data->flag.is_assigned) {
continue;
}
bool is_set{};
+ const auto aruid = data->aruid;
npad_resource.IsSupportedNpadStyleSet(is_set, aruid);
// Wait until style is defined
if (!is_set) {