controllers/npad: Rename NPadType to NpadStyleSet
This more accurately represents the underlying type and avoids confusion with NpadType
This commit is contained in:
parent
0a966e2cac
commit
428ce8ec29
@ -25,7 +25,7 @@ namespace Service::AM::Applets {
|
|||||||
static Core::Frontend::ControllerParameters ConvertToFrontendParameters(
|
static Core::Frontend::ControllerParameters ConvertToFrontendParameters(
|
||||||
ControllerSupportArgPrivate private_arg, ControllerSupportArgHeader header, bool enable_text,
|
ControllerSupportArgPrivate private_arg, ControllerSupportArgHeader header, bool enable_text,
|
||||||
std::vector<IdentificationColor> identification_colors, std::vector<ExplainText> text) {
|
std::vector<IdentificationColor> identification_colors, std::vector<ExplainText> text) {
|
||||||
HID::Controller_NPad::NPadType npad_style_set;
|
HID::Controller_NPad::NpadStyleSet npad_style_set;
|
||||||
npad_style_set.raw = private_arg.style_set;
|
npad_style_set.raw = private_arg.style_set;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -619,11 +619,11 @@ void Controller_NPad::OnMotionUpdate(const Core::Timing::CoreTiming& core_timing
|
|||||||
shared_memory_entries.size() * sizeof(NPadEntry));
|
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;
|
style.raw = style_set.raw;
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller_NPad::NPadType Controller_NPad::GetSupportedStyleSet() const {
|
Controller_NPad::NpadStyleSet Controller_NPad::GetSupportedStyleSet() const {
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
};
|
};
|
||||||
static_assert(sizeof(DeviceHandle) == 4, "DeviceHandle is an invalid size");
|
static_assert(sizeof(DeviceHandle) == 4, "DeviceHandle is an invalid size");
|
||||||
|
|
||||||
struct NPadType {
|
struct NpadStyleSet {
|
||||||
union {
|
union {
|
||||||
u32_le raw{};
|
u32_le raw{};
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ public:
|
|||||||
BitField<6, 1, u32> pokeball; // TODO(ogniK): Confirm when possible
|
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 {
|
struct Vibration {
|
||||||
f32 amp_low;
|
f32 amp_low;
|
||||||
@ -133,8 +133,8 @@ public:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
void SetSupportedStyleSet(NPadType style_set);
|
void SetSupportedStyleSet(NpadStyleSet style_set);
|
||||||
NPadType GetSupportedStyleSet() const;
|
NpadStyleSet GetSupportedStyleSet() const;
|
||||||
|
|
||||||
void SetSupportedNPadIdTypes(u8* data, std::size_t length);
|
void SetSupportedNPadIdTypes(u8* data, std::size_t length);
|
||||||
void GetSupportedNpadIdTypes(u32* data, std::size_t max_length);
|
void GetSupportedNpadIdTypes(u32* data, std::size_t max_length);
|
||||||
@ -347,7 +347,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct NPadEntry {
|
struct NPadEntry {
|
||||||
NPadType joy_styles;
|
NpadStyleSet joy_styles;
|
||||||
NPadAssignments pad_assignment;
|
NPadAssignments pad_assignment;
|
||||||
|
|
||||||
ColorReadError single_color_error;
|
ColorReadError single_color_error;
|
||||||
@ -391,7 +391,7 @@ private:
|
|||||||
|
|
||||||
u32 press_state{};
|
u32 press_state{};
|
||||||
|
|
||||||
NPadType style{};
|
NpadStyleSet style{};
|
||||||
std::array<NPadEntry, 10> shared_memory_entries{};
|
std::array<NPadEntry, 10> shared_memory_entries{};
|
||||||
using ButtonArray = std::array<
|
using ButtonArray = std::array<
|
||||||
std::array<std::unique_ptr<Input::ButtonDevice>, Settings::NativeButton::NUM_BUTTONS_HID>,
|
std::array<std::unique_ptr<Input::ButtonDevice>, Settings::NativeButton::NUM_BUTTONS_HID>,
|
||||||
|
Loading…
Reference in New Issue
Block a user