bump
This commit is contained in:
@ -241,7 +241,7 @@ void IHidServer::CreateAppletResource(HLERequestContext& ctx) {
|
|||||||
|
|
||||||
if (applet_resource == nullptr) {
|
if (applet_resource == nullptr) {
|
||||||
applet_resource = std::make_shared<IAppletResource>(system);
|
applet_resource = std::make_shared<IAppletResource>(system);
|
||||||
applet_resource->Initialize();
|
// applet_resource->Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
@ -1250,16 +1250,17 @@ void IHidServer::SetSupportedNpadStyleSet(HLERequestContext& ctx) {
|
|||||||
parameters.supported_style_set, parameters.applet_resource_user_id);
|
parameters.supported_style_set, parameters.applet_resource_user_id);
|
||||||
|
|
||||||
const auto npad = GetResourceManager()->GetNpad();
|
const auto npad = GetResourceManager()->GetNpad();
|
||||||
const auto result = npad->SetSupportedNpadStyleSet(parameters.applet_resource_user_id,
|
const Result result = npad->SetSupportedNpadStyleSet(parameters.applet_resource_user_id,
|
||||||
parameters.supported_style_set);
|
parameters.supported_style_set);
|
||||||
|
|
||||||
if (result.IsSuccess()) {
|
if (result.IsSuccess()) {
|
||||||
// NpadStyleTag style_tag{parameters.supported_style_set};
|
NpadStyleTag style_tag{parameters.supported_style_set};
|
||||||
// u32 aruid_index = GetResourceManager()->GetValue(parameters.applet_resource_user_id);
|
const auto revision = npad->GetNpadRevision(parameters.applet_resource_user_id);
|
||||||
// if (style_tag.gamecube != 0 && aruid_index < 3) {
|
|
||||||
// const auto palma = GetResourceManager()->GetPalma();
|
if (style_tag.gamecube != 0 && revision < NpadRevision::Revision3) {
|
||||||
// palma->EnablePalmaBoostMode(parameters.applet_resource_user_id, true);
|
GetResourceManager()->GetPalma()->EnablePalmaBoostMode(
|
||||||
// }
|
parameters.applet_resource_user_id, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
@ -1292,7 +1293,7 @@ void IHidServer::SetSupportedNpadIdType(HLERequestContext& ctx) {
|
|||||||
memcpy(npad_list.data(), buffer.data(), buffer.size());
|
memcpy(npad_list.data(), buffer.data(), buffer.size());
|
||||||
|
|
||||||
const auto npad = GetResourceManager()->GetNpad();
|
const auto npad = GetResourceManager()->GetNpad();
|
||||||
const auto result = npad->SetSupportedNpadIdType(applet_resource_user_id, npad_list);
|
const Result result = npad->SetSupportedNpadIdType(applet_resource_user_id, npad_list);
|
||||||
|
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
|
|
||||||
@ -1308,7 +1309,7 @@ void IHidServer::ActivateNpad(HLERequestContext& ctx) {
|
|||||||
|
|
||||||
const auto npad = GetResourceManager()->GetNpad();
|
const auto npad = GetResourceManager()->GetNpad();
|
||||||
npad->ActivateWithRevision(applet_resource_user_id, NpadRevision::Revision0);
|
npad->ActivateWithRevision(applet_resource_user_id, NpadRevision::Revision0);
|
||||||
const auto result = npad->Activate(applet_resource_user_id);
|
const Result result = npad->Activate(applet_resource_user_id);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
@ -2128,11 +2129,11 @@ void IHidServer::ActivateConsoleSixAxisSensor(HLERequestContext& ctx) {
|
|||||||
Result result = ResultSuccess;
|
Result result = ResultSuccess;
|
||||||
auto sixaxis = GetResourceManager()->GetConsoleSixAxis();
|
auto sixaxis = GetResourceManager()->GetConsoleSixAxis();
|
||||||
|
|
||||||
if (IsDeviceManaged()) {
|
//if (IsDeviceManaged()) {
|
||||||
result = sixaxis->Activate(applet_resource_user_id);
|
// result = sixaxis->Activate(applet_resource_user_id);
|
||||||
} else {
|
//} else {
|
||||||
result = sixaxis->Activate();
|
// result = sixaxis->Activate();
|
||||||
}
|
//}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
@ -2177,11 +2178,11 @@ void IHidServer::ActivateSevenSixAxisSensor(HLERequestContext& ctx) {
|
|||||||
Result result = ResultSuccess;
|
Result result = ResultSuccess;
|
||||||
auto sixaxis = GetResourceManager()->GetConsoleSixAxis();
|
auto sixaxis = GetResourceManager()->GetConsoleSixAxis();
|
||||||
|
|
||||||
if (IsDeviceManaged()) {
|
//if (IsDeviceManaged()) {
|
||||||
result = sixaxis->Activate(applet_resource_user_id);
|
// result = sixaxis->Activate(applet_resource_user_id);
|
||||||
} else {
|
//} else {
|
||||||
result = sixaxis->Activate();
|
// result = sixaxis->Activate();
|
||||||
}
|
//}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
@ -2194,18 +2195,18 @@ void IHidServer::StartSevenSixAxisSensor(HLERequestContext& ctx) {
|
|||||||
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
||||||
applet_resource_user_id);
|
applet_resource_user_id);
|
||||||
|
|
||||||
std::shared_ptr<SixAxisSensorState> state = nullptr;
|
//std::shared_ptr<SixAxisSensorState> state = nullptr;
|
||||||
const auto sixaxis = GetResourceManager()->GetSevenSixAxis();
|
//const auto sixaxis = GetResourceManager()->GetSevenSixAxis();
|
||||||
Result result = sixaxis->GetSensorState(state, parameters.applet_resource_user_id,
|
//Result result = sixaxis->GetSensorState(state, parameters.applet_resource_user_id,
|
||||||
parameters.sixaxis_handle);
|
// parameters.sixaxis_handle);
|
||||||
|
|
||||||
if (result.IsSuccess()) {
|
//if (result.IsSuccess()) {
|
||||||
result = GetResourceManager()->GetConsoleSixAxis()->ResetSevenSixAxisSensorTimestamp();
|
// result = GetResourceManager()->GetConsoleSixAxis()->ResetSevenSixAxisSensorTimestamp();
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (result.IsSuccess()) {
|
//if (result.IsSuccess()) {
|
||||||
state->SetRunningState(true);
|
// state->SetRunningState(true);
|
||||||
}
|
//}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
@ -2223,24 +2224,25 @@ void IHidServer::FinalizeSevenSixAxisSensor(HLERequestContext& ctx) {
|
|||||||
|
|
||||||
std::shared_ptr<SixAxisSensorState> state = nullptr;
|
std::shared_ptr<SixAxisSensorState> state = nullptr;
|
||||||
const auto sixaxis = GetResourceManager()->GetSevenSixAxis();
|
const auto sixaxis = GetResourceManager()->GetSevenSixAxis();
|
||||||
Result result = sixaxis->GetSensorState(state, parameters.applet_resource_user_id,
|
//Result result = sixaxis->GetSensorState(state, parameters.applet_resource_user_id,
|
||||||
parameters.sixaxis_handle);
|
// parameters.sixaxis_handle);
|
||||||
|
|
||||||
if (result.IsSuccess()) {
|
//if (result.IsSuccess()) {
|
||||||
state->SetRunningState(false);
|
// state->SetRunningState(false);
|
||||||
}
|
//}
|
||||||
|
|
||||||
result = GetResourceManager()->GetConsoleSixAxis()->FinalizeSevenSixAxisSensor();
|
// result = GetResourceManager()->GetConsoleSixAxis()->FinalizeSevenSixAxisSensor();
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHidServer::ResetSevenSixAxisSensorTimestamp(HLERequestContext& ctx) {}
|
void IHidServer::SetSevenSixAxisSensorFusionStrength(HLERequestContext& ctx) {}
|
||||||
void IHidServer::IsUsbFullKeyControllerEnabled(HLERequestContext& ctx) {}
|
void IHidServer::GetSevenSixAxisSensorFusionStrength(HLERequestContext& ctx) {}
|
||||||
|
|
||||||
void IHidServer::ResetSevenSixAxisSensorTimestamp(HLERequestContext& ctx) {}
|
void IHidServer::ResetSevenSixAxisSensorTimestamp(HLERequestContext& ctx) {}
|
||||||
|
|
||||||
|
|
||||||
void IHidServer::IsUsbFullKeyControllerEnabled(HLERequestContext& ctx) {
|
void IHidServer::IsUsbFullKeyControllerEnabled(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const bool is_enabled = false;
|
const bool is_enabled = false;
|
||||||
@ -2823,11 +2825,11 @@ void IHidServer::SetTouchScreenConfiguration(HLERequestContext& ctx) {
|
|||||||
touchscreen_mode.mode = TouchScreenModeForNx::UseSystemSetting;
|
touchscreen_mode.mode = TouchScreenModeForNx::UseSystemSetting;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Result result =
|
//const Result result =
|
||||||
GetResourceManager()->GetTouchScreen()->SetTouchScreenConfiguration(touchscreen_mode);
|
// GetResourceManager()->GetTouchScreen()->SetTouchScreenConfiguration(touchscreen_mode);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
//IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(result);
|
//rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHidServer::IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx) {
|
void IHidServer::IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx) {
|
||||||
|
@ -51,7 +51,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
|
|||||||
{317, nullptr, "GetNpadLeftRightInterfaceType"},
|
{317, nullptr, "GetNpadLeftRightInterfaceType"},
|
||||||
{318, nullptr, "HasBattery"},
|
{318, nullptr, "HasBattery"},
|
||||||
{319, nullptr, "HasLeftRightBattery"},
|
{319, nullptr, "HasLeftRightBattery"},
|
||||||
{321, &IHidSystemServer::GetUniquePadsFromNpad, "GetUniquePadsFromNpad"},
|
{321, nullptr/*&IHidSystemServer::GetUniquePadsFromNpad*/, "GetUniquePadsFromNpad"},
|
||||||
{322, nullptr, "GetIrSensorState"},
|
{322, nullptr, "GetIrSensorState"},
|
||||||
{323, nullptr, "GetXcdHandleForNpadWithIrSensor"},
|
{323, nullptr, "GetXcdHandleForNpadWithIrSensor"},
|
||||||
{324, nullptr, "GetUniquePadButtonSet"},
|
{324, nullptr, "GetUniquePadButtonSet"},
|
||||||
@ -93,7 +93,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
|
|||||||
{700, nullptr, "ActivateUniquePad"},
|
{700, nullptr, "ActivateUniquePad"},
|
||||||
{702, nullptr, "AcquireUniquePadConnectionEventHandle"},
|
{702, nullptr, "AcquireUniquePadConnectionEventHandle"},
|
||||||
{703, nullptr, "GetUniquePadIds"},
|
{703, nullptr, "GetUniquePadIds"},
|
||||||
{751, &IHidSystemServer::AcquireJoyDetachOnBluetoothOffEventHandle, "AcquireJoyDetachOnBluetoothOffEventHandle"},
|
{751, nullptr/*&IHidSystemServer::AcquireJoyDetachOnBluetoothOffEventHandle*/, "AcquireJoyDetachOnBluetoothOffEventHandle"},
|
||||||
{800, nullptr, "ListSixAxisSensorHandles"},
|
{800, nullptr, "ListSixAxisSensorHandles"},
|
||||||
{801, nullptr, "IsSixAxisSensorUserCalibrationSupported"},
|
{801, nullptr, "IsSixAxisSensorUserCalibrationSupported"},
|
||||||
{802, nullptr, "ResetSixAxisSensorCalibrationValues"},
|
{802, nullptr, "ResetSixAxisSensorCalibrationValues"},
|
||||||
@ -119,7 +119,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
|
|||||||
{830, nullptr, "SetNotificationLedPattern"},
|
{830, nullptr, "SetNotificationLedPattern"},
|
||||||
{831, nullptr, "SetNotificationLedPatternWithTimeout"},
|
{831, nullptr, "SetNotificationLedPatternWithTimeout"},
|
||||||
{832, nullptr, "PrepareHidsForNotificationWake"},
|
{832, nullptr, "PrepareHidsForNotificationWake"},
|
||||||
{850, &IHidSystemServer::IsUsbFullKeyControllerEnabled, "IsUsbFullKeyControllerEnabled"},
|
{850, nullptr/*&IHidSystemServer::IsUsbFullKeyControllerEnabled*/, "IsUsbFullKeyControllerEnabled"},
|
||||||
{851, nullptr, "EnableUsbFullKeyController"},
|
{851, nullptr, "EnableUsbFullKeyController"},
|
||||||
{852, nullptr, "IsUsbConnected"},
|
{852, nullptr, "IsUsbConnected"},
|
||||||
{870, nullptr, "IsHandheldButtonPressedOnConsoleMode"},
|
{870, nullptr, "IsHandheldButtonPressedOnConsoleMode"},
|
||||||
@ -266,7 +266,7 @@ void IHidSystemServer::GetLastActiveNpad(HLERequestContext& ctx) {
|
|||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
rb.PushEnum(ResultSuccess);
|
// rb.PushEnum(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHidSystemServer::ApplyNpadSystemCommonPolicyFull(HLERequestContext& ctx) {
|
void IHidSystemServer::ApplyNpadSystemCommonPolicyFull(HLERequestContext& ctx) {
|
||||||
@ -365,34 +365,34 @@ void IHidSystemServer::SetTouchScreenDefaultConfiguration(HLERequestContext& ctx
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
touch_screen_configuration.mode = TouchScreenModeForNx::UseSystemSetting;
|
touch_screen_configuration.mode = TouchScreenModeForNx::UseSystemSetting;
|
||||||
}
|
}/*
|
||||||
|
|
||||||
const Result result = GetResourceManager()->GetTouchScreen()->SetTouchScreenConfiguration(
|
const Result result = GetResourceManager()->GetTouchScreen()->SetTouchScreenConfiguration(
|
||||||
touch_screen_configuration);
|
touch_screen_configuration);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(result);
|
rb.Push(result);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHidSystemServer::GetTouchScreenDefaultConfiguration(HLERequestContext& ctx) {
|
void IHidSystemServer::GetTouchScreenDefaultConfiguration(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||||
|
|
||||||
TouchScreenConfigurationForNx touch_screen_configuration{};
|
//TouchScreenConfigurationForNx touch_screen_configuration{};
|
||||||
const Result result = GetResourceManager()->GetTouchScreen()->GetTouchScreenConfiguration(
|
//const Result result = GetResourceManager()->GetTouchScreen()->GetTouchScreenConfiguration(
|
||||||
touch_screen_configuration.mode);
|
// touch_screen_configuration.mode);
|
||||||
|
|
||||||
switch (touch_screen_configuration.mode) {
|
//switch (touch_screen_configuration.mode) {
|
||||||
case TouchScreenModeForNx::UseSystemSetting:
|
//case TouchScreenModeForNx::UseSystemSetting:
|
||||||
case TouchScreenModeForNx::Finger:
|
//case TouchScreenModeForNx::Finger:
|
||||||
case TouchScreenModeForNx::Heat2:
|
//case TouchScreenModeForNx::Heat2:
|
||||||
break;
|
// break;
|
||||||
default:
|
//default:
|
||||||
touch_screen_configuration.mode = TouchScreenModeForNx::UseSystemSetting;
|
// touch_screen_configuration.mode = TouchScreenModeForNx::UseSystemSetting;
|
||||||
}
|
//}
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 6};
|
//IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(ResultSuccess);
|
//rb.Push(ResultSuccess);
|
||||||
rb.PushRaw(touch_screen_configuration);
|
//rb.PushRaw(touch_screen_configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<ResourceManager> IHidSystemServer::GetResourceManager() {
|
std::shared_ptr<ResourceManager> IHidSystemServer::GetResourceManager() {
|
||||||
|
@ -18,7 +18,7 @@ AbstractNpadState::AbstractNpadState() {}
|
|||||||
AbstractNpadState::~AbstractNpadState() = default;
|
AbstractNpadState::~AbstractNpadState() = default;
|
||||||
|
|
||||||
Result AbstractNpadState::ActivateNpad(const u64 aruid) {
|
Result AbstractNpadState::ActivateNpad(const u64 aruid) {
|
||||||
Result result{}; // UpdateSpecial Controller State
|
Result result = ActivateUnknown();
|
||||||
if (result.IsSuccess()) {
|
if (result.IsSuccess()) {
|
||||||
result = UpdateNpadLifo(aruid);
|
result = UpdateNpadLifo(aruid);
|
||||||
if (result.IsError()) {
|
if (result.IsError()) {
|
||||||
@ -33,6 +33,10 @@ Result AbstractNpadState::ActivateNpad(const u64 aruid) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result AbstractNpadState::ActivateUnknown() {
|
||||||
|
return ResultSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
Result AbstractNpadState::UpdateNpadLifo(const u64 aruid) {
|
Result AbstractNpadState::UpdateNpadLifo(const u64 aruid) {
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
@ -184,7 +188,7 @@ Result Npad::SetSupportedNpadIdType(const u64 aruid, std::span<const NpadIdType>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result Npad::SetSupportedNpadIdTypeImpl(const u64 aruid, std::span<const NpadIdType> list) {
|
Result Npad::SetSupportedNpadIdTypeImpl(const u64 aruid, std::span<const NpadIdType> list) {
|
||||||
if (list.size() >= SUPPORTED_NPAD_TYPES_MAX) {
|
if (list.size() > SUPPORTED_NPAD_TYPES_MAX) {
|
||||||
return ResultInvalidArraySize;
|
return ResultInvalidArraySize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,11 +226,12 @@ Result Npad::SetSupportedNpadStyleSetImpl(const u64 aruid, const NpadStyleSet su
|
|||||||
return ResultNpadNotConnected;
|
return ResultNpadNotConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
npad_state[index]->SetSupportedNpadStyleSet(supported_style_set);
|
auto& state = npad_state[index];
|
||||||
|
state->SetSupportedNpadStyleSet(supported_style_set);
|
||||||
|
|
||||||
if (active_aruid == aruid) {
|
if (active_aruid == aruid) {
|
||||||
active_npad_state->SetSupportedNpadStyleSet(supported_style_set);
|
active_npad_state->SetSupportedNpadStyleSet(supported_style_set);
|
||||||
active_npad_state->SetNpadJoyHoldType(npad_state[index]->GetNpadJoyHoldType());
|
active_npad_state->SetNpadJoyHoldType(state->GetNpadJoyHoldType());
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
@ -269,7 +274,7 @@ bool Npad::IsFirmwareUpdateAvailableForSixAxisSensor(const SixAxisSensorHandle&
|
|||||||
|
|
||||||
Result Npad::ResetIsSixAxisSensorDeviceNewlyAssigned(const u64 aruid,
|
Result Npad::ResetIsSixAxisSensorDeviceNewlyAssigned(const u64 aruid,
|
||||||
const SixAxisSensorHandle& handle) {
|
const SixAxisSensorHandle& handle) {
|
||||||
// auto npad_index = NpadIdTypeToIndex(static_cast<NpadIdType>(handle.device_index));
|
//auto npad_index = NpadIdTypeToIndex(static_cast<NpadIdType>(handle.device_index));
|
||||||
|
|
||||||
// TODO: Implement this part
|
// TODO: Implement this part
|
||||||
|
|
||||||
@ -868,6 +873,16 @@ Result Npad::GetLastActiveNpad(NpadIdType& out_npad_id) const {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NpadRevision Npad::GetNpadRevision(const u64 aruid) const {
|
||||||
|
const auto index = GetIndexFromAruid(aruid);
|
||||||
|
|
||||||
|
if (index >= ARUID_MAX) {
|
||||||
|
return NpadRevision::Revision0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return npad_state[index]->GetNpadRevision();
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<AbstractNpadState> Npad::GetAbstractNpad(const NpadIdType npad_id) {
|
std::shared_ptr<AbstractNpadState> Npad::GetAbstractNpad(const NpadIdType npad_id) {
|
||||||
return abstract_npad_state[NpadIdTypeToIndex(npad_id)];
|
return abstract_npad_state[NpadIdTypeToIndex(npad_id)];
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,17 @@ private:
|
|||||||
};
|
};
|
||||||
static_assert(sizeof(BatteryState) == 0x40, "BatteryState is an invalid size");
|
static_assert(sizeof(BatteryState) == 0x40, "BatteryState is an invalid size");
|
||||||
|
|
||||||
|
struct Unknown0x88 {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct AbstractState {
|
||||||
|
INSERT_PADDING_BYTES(0x88);
|
||||||
|
Unknown0x88 unknown_0x88{};
|
||||||
|
};
|
||||||
|
|
||||||
|
Result ActivateUnknown();
|
||||||
|
|
||||||
Result UpdateNpadLifo(const u64 aruid);
|
Result UpdateNpadLifo(const u64 aruid);
|
||||||
Result UpdateSixaxisLifo(const u64 aruid);
|
Result UpdateSixaxisLifo(const u64 aruid);
|
||||||
Result UpdateBatteryLifo(const u64 aruid);
|
Result UpdateBatteryLifo(const u64 aruid);
|
||||||
@ -73,6 +84,8 @@ private:
|
|||||||
NpadInternalState& internal_state);
|
NpadInternalState& internal_state);
|
||||||
void UpdateBatteryLifoImpl(const BatteryState& battery_state,
|
void UpdateBatteryLifoImpl(const BatteryState& battery_state,
|
||||||
NpadInternalState& internal_state);
|
NpadInternalState& internal_state);
|
||||||
|
|
||||||
|
AbstractState state{};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Npad final : public BaseResource {
|
class Npad final : public BaseResource {
|
||||||
@ -145,6 +158,8 @@ public:
|
|||||||
bool IsFirmwareUpdateNeededForNotification(const u64 aruid, const s32 unknown) const;
|
bool IsFirmwareUpdateNeededForNotification(const u64 aruid, const s32 unknown) const;
|
||||||
Result GetLastActiveNpad(NpadIdType& out_npad_id) const;
|
Result GetLastActiveNpad(NpadIdType& out_npad_id) const;
|
||||||
|
|
||||||
|
NpadRevision GetNpadRevision(const u64 aruid) const;
|
||||||
|
|
||||||
std::shared_ptr<AbstractNpadState> GetAbstractNpad(const NpadIdType npad_id);
|
std::shared_ptr<AbstractNpadState> GetAbstractNpad(const NpadIdType npad_id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user