summaryrefslogtreecommitdiffstats
path: root/src/core/hid
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-11-16 15:13:56 +0100
committerGitHub <noreply@github.com>2023-11-16 15:13:56 +0100
commit7eac28e410e5c3293125602b91d8082e2c57ade1 (patch)
treeb2a263584ca273e636ae76e9bf47b1974f4ef68e /src/core/hid
parentMerge pull request #12007 from german77/moar_buttons (diff)
parentservice: hid: Split hid.cpp into individual interfaces (diff)
downloadyuzu-7eac28e410e5c3293125602b91d8082e2c57ade1.tar
yuzu-7eac28e410e5c3293125602b91d8082e2c57ade1.tar.gz
yuzu-7eac28e410e5c3293125602b91d8082e2c57ade1.tar.bz2
yuzu-7eac28e410e5c3293125602b91d8082e2c57ade1.tar.lz
yuzu-7eac28e410e5c3293125602b91d8082e2c57ade1.tar.xz
yuzu-7eac28e410e5c3293125602b91d8082e2c57ade1.tar.zst
yuzu-7eac28e410e5c3293125602b91d8082e2c57ade1.zip
Diffstat (limited to '')
-rw-r--r--src/core/hid/emulated_console.h8
-rw-r--r--src/core/hid/hid_types.h8
-rw-r--r--src/core/hid/input_interpreter.cpp7
3 files changed, 12 insertions, 11 deletions
diff --git a/src/core/hid/emulated_console.h b/src/core/hid/emulated_console.h
index 79114bb6d..fae15a556 100644
--- a/src/core/hid/emulated_console.h
+++ b/src/core/hid/emulated_console.h
@@ -38,14 +38,6 @@ using TouchParams = std::array<Common::ParamPackage, MaxTouchDevices>;
using ConsoleMotionValues = ConsoleMotionInfo;
using TouchValues = std::array<Common::Input::TouchStatus, MaxTouchDevices>;
-struct TouchFinger {
- u64 last_touch{};
- Common::Point<float> position{};
- u32 id{};
- TouchAttribute attribute{};
- bool pressed{};
-};
-
// Contains all motion related data that is used on the services
struct ConsoleMotion {
Common::Vec3f accel{};
diff --git a/src/core/hid/hid_types.h b/src/core/hid/hid_types.h
index 7ba75a50c..9d48cd90e 100644
--- a/src/core/hid/hid_types.h
+++ b/src/core/hid/hid_types.h
@@ -356,6 +356,14 @@ struct TouchState {
};
static_assert(sizeof(TouchState) == 0x28, "Touchstate is an invalid size");
+struct TouchFinger {
+ u64 last_touch{};
+ Common::Point<float> position{};
+ u32 id{};
+ TouchAttribute attribute{};
+ bool pressed{};
+};
+
// This is nn::hid::TouchScreenConfigurationForNx
struct TouchScreenConfigurationForNx {
TouchScreenModeForNx mode{TouchScreenModeForNx::UseSystemSetting};
diff --git a/src/core/hid/input_interpreter.cpp b/src/core/hid/input_interpreter.cpp
index 76d6b8ab0..11359f318 100644
--- a/src/core/hid/input_interpreter.cpp
+++ b/src/core/hid/input_interpreter.cpp
@@ -5,13 +5,14 @@
#include "core/hid/hid_types.h"
#include "core/hid/input_interpreter.h"
#include "core/hle/service/hid/controllers/npad.h"
-#include "core/hle/service/hid/hid.h"
+#include "core/hle/service/hid/hid_server.h"
+#include "core/hle/service/hid/resource_manager.h"
#include "core/hle/service/sm/sm.h"
InputInterpreter::InputInterpreter(Core::System& system)
: npad{system.ServiceManager()
- .GetService<Service::HID::Hid>("hid")
- ->GetAppletResource()
+ .GetService<Service::HID::IHidServer>("hid")
+ ->GetResourceManager()
->GetController<Service::HID::Controller_NPad>(Service::HID::HidController::NPad)} {
ResetButtonStates();
}