summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-10-08 07:08:37 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-11-16 05:33:20 +0100
commit428ce8ec2909100fb8dde520254508a274c448ea (patch)
tree9fe5a9c14c1361db013601a34ce59224de963647 /src/core/hle/service/hid
parentcontrollers/npad: Add DeviceHandle struct (diff)
downloadyuzu-428ce8ec2909100fb8dde520254508a274c448ea.tar
yuzu-428ce8ec2909100fb8dde520254508a274c448ea.tar.gz
yuzu-428ce8ec2909100fb8dde520254508a274c448ea.tar.bz2
yuzu-428ce8ec2909100fb8dde520254508a274c448ea.tar.lz
yuzu-428ce8ec2909100fb8dde520254508a274c448ea.tar.xz
yuzu-428ce8ec2909100fb8dde520254508a274c448ea.tar.zst
yuzu-428ce8ec2909100fb8dde520254508a274c448ea.zip
Diffstat (limited to 'src/core/hle/service/hid')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp4
-rw-r--r--src/core/hle/service/hid/controllers/npad.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 15d5fa6e8..8181bddbc 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -619,11 +619,11 @@ void Controller_NPad::OnMotionUpdate(const Core::Timing::CoreTiming& core_timing
shared_memory_entries.size() * sizeof(NPadEntry));
}
-void Controller_NPad::SetSupportedStyleSet(NPadType style_set) {
+void Controller_NPad::SetSupportedStyleSet(NpadStyleSet style_set) {
style.raw = style_set.raw;
}
-Controller_NPad::NPadType Controller_NPad::GetSupportedStyleSet() const {
+Controller_NPad::NpadStyleSet Controller_NPad::GetSupportedStyleSet() const {
return style;
}
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h
index 8dabae6e3..fed8425b1 100644
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/core/hle/service/hid/controllers/npad.h
@@ -94,7 +94,7 @@ public:
};
static_assert(sizeof(DeviceHandle) == 4, "DeviceHandle is an invalid size");
- struct NPadType {
+ struct NpadStyleSet {
union {
u32_le raw{};
@@ -107,7 +107,7 @@ public:
BitField<6, 1, u32> pokeball; // TODO(ogniK): Confirm when possible
};
};
- static_assert(sizeof(NPadType) == 4, "NPadType is an invalid size");
+ static_assert(sizeof(NpadStyleSet) == 4, "NpadStyleSet is an invalid size");
struct Vibration {
f32 amp_low;
@@ -133,8 +133,8 @@ public:
};
};
- void SetSupportedStyleSet(NPadType style_set);
- NPadType GetSupportedStyleSet() const;
+ void SetSupportedStyleSet(NpadStyleSet style_set);
+ NpadStyleSet GetSupportedStyleSet() const;
void SetSupportedNPadIdTypes(u8* data, std::size_t length);
void GetSupportedNpadIdTypes(u32* data, std::size_t max_length);
@@ -347,7 +347,7 @@ private:
};
struct NPadEntry {
- NPadType joy_styles;
+ NpadStyleSet joy_styles;
NPadAssignments pad_assignment;
ColorReadError single_color_error;
@@ -391,7 +391,7 @@ private:
u32 press_state{};
- NPadType style{};
+ NpadStyleSet style{};
std::array<NPadEntry, 10> shared_memory_entries{};
using ButtonArray = std::array<
std::array<std::unique_ptr<Input::ButtonDevice>, Settings::NativeButton::NUM_BUTTONS_HID>,