diff options
Diffstat (limited to 'src/core/hid')
| -rw-r--r-- | src/core/hid/hid_types.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/hid/hid_types.h b/src/core/hid/hid_types.h index 6b35f448c..00beb40dd 100644 --- a/src/core/hid/hid_types.h +++ b/src/core/hid/hid_types.h | |||
| @@ -289,6 +289,19 @@ enum class GyroscopeZeroDriftMode : u32 { | |||
| 289 | Tight = 2, | 289 | Tight = 2, |
| 290 | }; | 290 | }; |
| 291 | 291 | ||
| 292 | // This is nn::settings::system::TouchScreenMode | ||
| 293 | enum class TouchScreenMode : u32 { | ||
| 294 | Stylus = 0, | ||
| 295 | Standard = 1, | ||
| 296 | }; | ||
| 297 | |||
| 298 | // This is nn::hid::TouchScreenModeForNx | ||
| 299 | enum class TouchScreenModeForNx : u8 { | ||
| 300 | UseSystemSetting, | ||
| 301 | Finger, | ||
| 302 | Heat2, | ||
| 303 | }; | ||
| 304 | |||
| 292 | // This is nn::hid::NpadStyleTag | 305 | // This is nn::hid::NpadStyleTag |
| 293 | struct NpadStyleTag { | 306 | struct NpadStyleTag { |
| 294 | union { | 307 | union { |
| @@ -334,6 +347,14 @@ struct TouchState { | |||
| 334 | }; | 347 | }; |
| 335 | static_assert(sizeof(TouchState) == 0x28, "Touchstate is an invalid size"); | 348 | static_assert(sizeof(TouchState) == 0x28, "Touchstate is an invalid size"); |
| 336 | 349 | ||
| 350 | // This is nn::hid::TouchScreenConfigurationForNx | ||
| 351 | struct TouchScreenConfigurationForNx { | ||
| 352 | TouchScreenModeForNx mode{TouchScreenModeForNx::UseSystemSetting}; | ||
| 353 | INSERT_PADDING_BYTES(0xF); | ||
| 354 | }; | ||
| 355 | static_assert(sizeof(TouchScreenConfigurationForNx) == 0x10, | ||
| 356 | "TouchScreenConfigurationForNx is an invalid size"); | ||
| 357 | |||
| 337 | struct NpadColor { | 358 | struct NpadColor { |
| 338 | u8 r{}; | 359 | u8 r{}; |
| 339 | u8 g{}; | 360 | u8 g{}; |
| @@ -662,6 +683,11 @@ struct MouseState { | |||
| 662 | }; | 683 | }; |
| 663 | static_assert(sizeof(MouseState) == 0x28, "MouseState is an invalid size"); | 684 | static_assert(sizeof(MouseState) == 0x28, "MouseState is an invalid size"); |
| 664 | 685 | ||
| 686 | struct UniquePadId { | ||
| 687 | u64 id; | ||
| 688 | }; | ||
| 689 | static_assert(sizeof(UniquePadId) == 0x8, "UniquePadId is an invalid size"); | ||
| 690 | |||
| 665 | /// Converts a NpadIdType to an array index. | 691 | /// Converts a NpadIdType to an array index. |
| 666 | constexpr size_t NpadIdTypeToIndex(NpadIdType npad_id_type) { | 692 | constexpr size_t NpadIdTypeToIndex(NpadIdType npad_id_type) { |
| 667 | switch (npad_id_type) { | 693 | switch (npad_id_type) { |