Browse Source
Merge pull request #12836 from german77/im_home
Merge pull request #12836 from german77/im_home
service: hid: Implement home, capture and sleep buttonsnce_cpp
committed by
GitHub
11 changed files with 104 additions and 37 deletions
-
1src/hid_core/CMakeLists.txt
-
10src/hid_core/hid_types.h
-
13src/hid_core/resources/shared_memory_format.h
-
26src/hid_core/resources/system_buttons/capture_button.cpp
-
3src/hid_core/resources/system_buttons/capture_button.h
-
26src/hid_core/resources/system_buttons/home_button.cpp
-
3src/hid_core/resources/system_buttons/home_button.h
-
23src/hid_core/resources/system_buttons/sleep_button.cpp
-
3src/hid_core/resources/system_buttons/sleep_button.h
-
31src/hid_core/resources/system_buttons/system_button_types.h
-
2src/hid_core/resources/unique_pad/unique_pad.cpp
@ -0,0 +1,31 @@ |
|||||
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
||||
|
// SPDX-License-Identifier: GPL-3.0-or-later |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include "hid_core/hid_types.h" |
||||
|
|
||||
|
namespace Service::HID { |
||||
|
|
||||
|
// This is nn::hid::system::SleepButtonState |
||||
|
struct SleepButtonState { |
||||
|
s64 sampling_number{}; |
||||
|
Core::HID::SleepButtonState buttons; |
||||
|
}; |
||||
|
static_assert(sizeof(SleepButtonState) == 0x10, "SleepButtonState is an invalid size"); |
||||
|
|
||||
|
// This is nn::hid::system::HomeButtonState |
||||
|
struct HomeButtonState { |
||||
|
s64 sampling_number{}; |
||||
|
Core::HID::HomeButtonState buttons; |
||||
|
}; |
||||
|
static_assert(sizeof(HomeButtonState) == 0x10, "HomeButtonState is an invalid size"); |
||||
|
|
||||
|
// This is nn::hid::system::SleepButtonState |
||||
|
struct CaptureButtonState { |
||||
|
s64 sampling_number{}; |
||||
|
Core::HID::CaptureButtonState buttons; |
||||
|
}; |
||||
|
static_assert(sizeof(CaptureButtonState) == 0x10, "CaptureButtonState is an invalid size"); |
||||
|
|
||||
|
} // namespace Service::HID |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue