mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-01 00:12:55 +00:00
Merge pull request #1841 from ogniK5377/npad-mode-fix
Fixed crash with SetNpadMode
This commit is contained in:
commit
a238cdb5ca
|
@ -518,8 +518,9 @@ Controller_NPad::NpadHoldType Controller_NPad::GetHoldType() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller_NPad::SetNpadMode(u32 npad_id, NPadAssignments assignment_mode) {
|
void Controller_NPad::SetNpadMode(u32 npad_id, NPadAssignments assignment_mode) {
|
||||||
ASSERT(npad_id < shared_memory_entries.size());
|
const std::size_t npad_index = NPadIdToIndex(npad_id);
|
||||||
shared_memory_entries[npad_id].pad_assignment = assignment_mode;
|
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,
|
void Controller_NPad::VibrateController(const std::vector<u32>& controller_ids,
|
||||||
|
|
Loading…
Reference in a new issue