mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Merge pull request #561 from DarkLordZach/fix-odyssey-input-crash
Avoid initializing single-joycon layouts with handheld controller
This commit is contained in:
commit
0d8ae773f1
1 changed files with 4 additions and 0 deletions
|
@ -84,6 +84,10 @@ private:
|
||||||
|
|
||||||
for (size_t controller = 0; controller < mem.controllers.size(); controller++) {
|
for (size_t controller = 0; controller < mem.controllers.size(); controller++) {
|
||||||
for (int index = 0; index < HID_NUM_LAYOUTS; index++) {
|
for (int index = 0; index < HID_NUM_LAYOUTS; index++) {
|
||||||
|
// TODO(DarkLordZach): Is this layout/controller config actually invalid?
|
||||||
|
if (controller == Controller_Handheld && index == Layout_Single)
|
||||||
|
continue;
|
||||||
|
|
||||||
ControllerLayout& layout = mem.controllers[controller].layouts[index];
|
ControllerLayout& layout = mem.controllers[controller].layouts[index];
|
||||||
layout.header.num_entries = HID_NUM_ENTRIES;
|
layout.header.num_entries = HID_NUM_ENTRIES;
|
||||||
layout.header.max_entry_index = HID_NUM_ENTRIES - 1;
|
layout.header.max_entry_index = HID_NUM_ENTRIES - 1;
|
||||||
|
|
Loading…
Reference in a new issue