mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-05 06:22:45 +01:00
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
This commit is contained in:
commit
33dbf24b56
2 changed files with 3 additions and 2 deletions
|
@ -94,7 +94,6 @@ private:
|
||||||
layout.header.latest_entry = (layout.header.latest_entry + 1) % HID_NUM_ENTRIES;
|
layout.header.latest_entry = (layout.header.latest_entry + 1) % HID_NUM_ENTRIES;
|
||||||
|
|
||||||
ControllerInputEntry& entry = layout.entries[layout.header.latest_entry];
|
ControllerInputEntry& entry = layout.entries[layout.header.latest_entry];
|
||||||
entry.connection_state = ConnectionState_Connected | ConnectionState_Wired;
|
|
||||||
entry.timestamp++;
|
entry.timestamp++;
|
||||||
// TODO(shinyquagsire23): Is this always identical to timestamp?
|
// TODO(shinyquagsire23): Is this always identical to timestamp?
|
||||||
entry.timestamp_2++;
|
entry.timestamp_2++;
|
||||||
|
@ -103,6 +102,8 @@ private:
|
||||||
if (controller != Controller_Handheld)
|
if (controller != Controller_Handheld)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
entry.connection_state = ConnectionState_Connected | ConnectionState_Wired;
|
||||||
|
|
||||||
// TODO(shinyquagsire23): Set up some LUTs for each layout mapping in the future?
|
// TODO(shinyquagsire23): Set up some LUTs for each layout mapping in the future?
|
||||||
// For now everything is just the default handheld layout, but split Joy-Con will
|
// For now everything is just the default handheld layout, but split Joy-Con will
|
||||||
// rotate the face buttons and directions for certain layouts.
|
// rotate the face buttons and directions for certain layouts.
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Service::HID {
|
||||||
// Begin enums and output structs
|
// Begin enums and output structs
|
||||||
|
|
||||||
constexpr u32 HID_NUM_ENTRIES = 17;
|
constexpr u32 HID_NUM_ENTRIES = 17;
|
||||||
constexpr u32 HID_NUM_LAYOUTS = 2;
|
constexpr u32 HID_NUM_LAYOUTS = 7;
|
||||||
constexpr s32 HID_JOYSTICK_MAX = 0x8000;
|
constexpr s32 HID_JOYSTICK_MAX = 0x8000;
|
||||||
constexpr s32 HID_JOYSTICK_MIN = -0x8000;
|
constexpr s32 HID_JOYSTICK_MIN = -0x8000;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue