summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-12-02 16:45:08 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-12-02 16:45:08 +0100
commita9223c81820701971017e672fbb9ca065e560f7c (patch)
tree83a03bb48e9c6d8ab17fc9755830e57c8b159031 /src
parentMerge pull request #1827 from ReinUsesLisp/clip-and-shader (diff)
downloadyuzu-a9223c81820701971017e672fbb9ca065e560f7c.tar
yuzu-a9223c81820701971017e672fbb9ca065e560f7c.tar.gz
yuzu-a9223c81820701971017e672fbb9ca065e560f7c.tar.bz2
yuzu-a9223c81820701971017e672fbb9ca065e560f7c.tar.lz
yuzu-a9223c81820701971017e672fbb9ca065e560f7c.tar.xz
yuzu-a9223c81820701971017e672fbb9ca065e560f7c.tar.zst
yuzu-a9223c81820701971017e672fbb9ca065e560f7c.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 22e87a50a..b49e34594 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -518,8 +518,9 @@ Controller_NPad::NpadHoldType Controller_NPad::GetHoldType() const {
}
void Controller_NPad::SetNpadMode(u32 npad_id, NPadAssignments assignment_mode) {
- ASSERT(npad_id < shared_memory_entries.size());
- shared_memory_entries[npad_id].pad_assignment = assignment_mode;
+ const std::size_t npad_index = NPadIdToIndex(npad_id);
+ ASSERT(npad_index < shared_memory_entries.size());
+ shared_memory_entries[npad_index].pad_assignment = assignment_mode;
}
void Controller_NPad::VibrateController(const std::vector<u32>& controller_ids,