early-access version 3311
This commit is contained in:
@@ -272,8 +272,6 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) {
|
||||
}
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::JoyconLeft:
|
||||
shared_memory->fullkey_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->fullkey_color.fullkey = body_colors.left;
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->joycon_color.left = body_colors.left;
|
||||
shared_memory->battery_level_dual = battery_level.left.battery_level;
|
||||
@@ -287,8 +285,6 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) {
|
||||
shared_memory->sixaxis_left_properties.is_newly_assigned.Assign(1);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::JoyconRight:
|
||||
shared_memory->fullkey_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->fullkey_color.fullkey = body_colors.right;
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->joycon_color.right = body_colors.right;
|
||||
shared_memory->battery_level_right = battery_level.right.battery_level;
|
||||
@@ -336,20 +332,6 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) {
|
||||
|
||||
controller.is_connected = true;
|
||||
controller.device->Connect();
|
||||
controller.device->SetLedPattern();
|
||||
if (controller_type == Core::HID::NpadStyleIndex::JoyconDual) {
|
||||
if (controller.is_dual_left_connected) {
|
||||
controller.device->SetPollingMode(Core::HID::EmulatedDeviceIndex::LeftIndex,
|
||||
Common::Input::PollingMode::Active);
|
||||
}
|
||||
if (controller.is_dual_right_connected) {
|
||||
controller.device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex,
|
||||
Common::Input::PollingMode::Active);
|
||||
}
|
||||
} else {
|
||||
controller.device->SetPollingMode(Core::HID::EmulatedDeviceIndex::AllDevices,
|
||||
Common::Input::PollingMode::Active);
|
||||
}
|
||||
SignalStyleSetChangedEvent(npad_id);
|
||||
WriteEmptyEntry(controller.shared_memory);
|
||||
}
|
||||
@@ -755,12 +737,11 @@ Core::HID::NpadStyleTag Controller_NPad::GetSupportedStyleSet() const {
|
||||
return hid_core.GetSupportedStyleTag();
|
||||
}
|
||||
|
||||
void Controller_NPad::SetSupportedNpadIdTypes(std::span<const u8> data) {
|
||||
const auto length = data.size();
|
||||
void Controller_NPad::SetSupportedNpadIdTypes(u8* data, std::size_t length) {
|
||||
ASSERT(length > 0 && (length % sizeof(u32)) == 0);
|
||||
supported_npad_id_types.clear();
|
||||
supported_npad_id_types.resize(length / sizeof(u32));
|
||||
std::memcpy(supported_npad_id_types.data(), data.data(), length);
|
||||
std::memcpy(supported_npad_id_types.data(), data, length);
|
||||
}
|
||||
|
||||
void Controller_NPad::GetSupportedNpadIdTypes(u32* data, std::size_t max_length) {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <span>
|
||||
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_types.h"
|
||||
@@ -96,7 +95,7 @@ public:
|
||||
void SetSupportedStyleSet(Core::HID::NpadStyleTag style_set);
|
||||
Core::HID::NpadStyleTag GetSupportedStyleSet() const;
|
||||
|
||||
void SetSupportedNpadIdTypes(std::span<const u8> data);
|
||||
void SetSupportedNpadIdTypes(u8* data, std::size_t length);
|
||||
void GetSupportedNpadIdTypes(u32* data, std::size_t max_length);
|
||||
std::size_t GetSupportedNpadIdTypesSize() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user