diff options
| author | 2018-06-12 09:07:38 -0400 | |
|---|---|---|
| committer | 2018-06-12 09:07:38 -0400 | |
| commit | 33dbf24b5660a17d820d613efaf19c6427224b7f (patch) | |
| tree | 09b098f55511dcb44de2bd922110d05691590a9f /src | |
| parent | Merge pull request #552 from bunnei/sat-fmul (diff) | |
| parent | hid: Update all layouts and only show handheld as connected, fixes libnx inpu... (diff) | |
| download | yuzu-33dbf24b5660a17d820d613efaf19c6427224b7f.tar.gz yuzu-33dbf24b5660a17d820d613efaf19c6427224b7f.tar.xz yuzu-33dbf24b5660a17d820d613efaf19c6427224b7f.zip | |
Merge pull request #557 from shinyquagsire23/libnx-hid-fix
hid: Update all layouts and only show handheld as connected, fixes libnx input for P1_AUTO
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hid.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 00c5308ba..85ca4bf06 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -94,7 +94,6 @@ private: | |||
| 94 | layout.header.latest_entry = (layout.header.latest_entry + 1) % HID_NUM_ENTRIES; | 94 | layout.header.latest_entry = (layout.header.latest_entry + 1) % HID_NUM_ENTRIES; |
| 95 | 95 | ||
| 96 | ControllerInputEntry& entry = layout.entries[layout.header.latest_entry]; | 96 | ControllerInputEntry& entry = layout.entries[layout.header.latest_entry]; |
| 97 | entry.connection_state = ConnectionState_Connected | ConnectionState_Wired; | ||
| 98 | entry.timestamp++; | 97 | entry.timestamp++; |
| 99 | // TODO(shinyquagsire23): Is this always identical to timestamp? | 98 | // TODO(shinyquagsire23): Is this always identical to timestamp? |
| 100 | entry.timestamp_2++; | 99 | entry.timestamp_2++; |
| @@ -103,6 +102,8 @@ private: | |||
| 103 | if (controller != Controller_Handheld) | 102 | if (controller != Controller_Handheld) |
| 104 | continue; | 103 | continue; |
| 105 | 104 | ||
| 105 | entry.connection_state = ConnectionState_Connected | ConnectionState_Wired; | ||
| 106 | |||
| 106 | // TODO(shinyquagsire23): Set up some LUTs for each layout mapping in the future? | 107 | // TODO(shinyquagsire23): Set up some LUTs for each layout mapping in the future? |
| 107 | // For now everything is just the default handheld layout, but split Joy-Con will | 108 | // For now everything is just the default handheld layout, but split Joy-Con will |
| 108 | // rotate the face buttons and directions for certain layouts. | 109 | // rotate the face buttons and directions for certain layouts. |
diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index 15eee8f01..b499308d6 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h | |||
| @@ -12,7 +12,7 @@ namespace Service::HID { | |||
| 12 | // Begin enums and output structs | 12 | // Begin enums and output structs |
| 13 | 13 | ||
| 14 | constexpr u32 HID_NUM_ENTRIES = 17; | 14 | constexpr u32 HID_NUM_ENTRIES = 17; |
| 15 | constexpr u32 HID_NUM_LAYOUTS = 2; | 15 | constexpr u32 HID_NUM_LAYOUTS = 7; |
| 16 | constexpr s32 HID_JOYSTICK_MAX = 0x8000; | 16 | constexpr s32 HID_JOYSTICK_MAX = 0x8000; |
| 17 | constexpr s32 HID_JOYSTICK_MIN = -0x8000; | 17 | constexpr s32 HID_JOYSTICK_MIN = -0x8000; |
| 18 | 18 | ||