rebase to latest master
This commit is contained in:
parent
a7306fb589
commit
7843915b71
|
@ -2,13 +2,13 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/hle/service/hid/resource_manager.h"
|
||||
#include "core/hle/service/hid/hid.h"
|
||||
#include "core/hle/service/hid/hid_debug_server.h"
|
||||
#include "core/hle/service/hid/hid_server.h"
|
||||
#include "core/hle/service/hid/hid_system_server.h"
|
||||
#include "core/hle/service/hid/hidbus.h"
|
||||
#include "core/hle/service/hid/irs.h"
|
||||
#include "core/hle/service/hid/resource_manager.h"
|
||||
#include "core/hle/service/hid/xcd.h"
|
||||
#include "core/hle/service/server_manager.h"
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ void IHidServer::CreateAppletResource(HLERequestContext& ctx) {
|
|||
|
||||
if (applet_resource == nullptr) {
|
||||
applet_resource = std::make_shared<IAppletResource>(system);
|
||||
// applet_resource->Initialize();
|
||||
// applet_resource->Initialize();
|
||||
}
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
|
@ -325,8 +325,7 @@ void IHidServer::ActivateKeyboard(HLERequestContext& ctx) {
|
|||
rb.Push(result);
|
||||
}
|
||||
|
||||
void IHidServer::SendKeyboardLockKeyEvent(HLERequestContext& ctx) {
|
||||
}
|
||||
void IHidServer::SendKeyboardLockKeyEvent(HLERequestContext& ctx) {}
|
||||
|
||||
void IHidServer::AcquireXpadIdEventHandle(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
|
@ -1251,7 +1250,7 @@ void IHidServer::SetSupportedNpadStyleSet(HLERequestContext& ctx) {
|
|||
|
||||
const auto npad = GetResourceManager()->GetNpad();
|
||||
const Result result = npad->SetSupportedNpadStyleSet(parameters.applet_resource_user_id,
|
||||
parameters.supported_style_set);
|
||||
parameters.supported_style_set);
|
||||
|
||||
if (result.IsSuccess()) {
|
||||
NpadStyleTag style_tag{parameters.supported_style_set};
|
||||
|
@ -2129,11 +2128,11 @@ void IHidServer::ActivateConsoleSixAxisSensor(HLERequestContext& ctx) {
|
|||
Result result = ResultSuccess;
|
||||
auto sixaxis = GetResourceManager()->GetConsoleSixAxis();
|
||||
|
||||
//if (IsDeviceManaged()) {
|
||||
// result = sixaxis->Activate(applet_resource_user_id);
|
||||
//} else {
|
||||
// result = sixaxis->Activate();
|
||||
//}
|
||||
// if (IsDeviceManaged()) {
|
||||
// result = sixaxis->Activate(applet_resource_user_id);
|
||||
// } else {
|
||||
// result = sixaxis->Activate();
|
||||
// }
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(result);
|
||||
|
@ -2178,11 +2177,11 @@ void IHidServer::ActivateSevenSixAxisSensor(HLERequestContext& ctx) {
|
|||
Result result = ResultSuccess;
|
||||
auto sixaxis = GetResourceManager()->GetConsoleSixAxis();
|
||||
|
||||
//if (IsDeviceManaged()) {
|
||||
// result = sixaxis->Activate(applet_resource_user_id);
|
||||
//} else {
|
||||
// result = sixaxis->Activate();
|
||||
//}
|
||||
// if (IsDeviceManaged()) {
|
||||
// result = sixaxis->Activate(applet_resource_user_id);
|
||||
// } else {
|
||||
// result = sixaxis->Activate();
|
||||
// }
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(result);
|
||||
|
@ -2195,18 +2194,18 @@ void IHidServer::StartSevenSixAxisSensor(HLERequestContext& ctx) {
|
|||
LOG_WARNING(Service_HID, "(STUBBED) called, applet_resource_user_id={}",
|
||||
applet_resource_user_id);
|
||||
|
||||
//std::shared_ptr<SixAxisSensorState> state = nullptr;
|
||||
//const auto sixaxis = GetResourceManager()->GetSevenSixAxis();
|
||||
//Result result = sixaxis->GetSensorState(state, parameters.applet_resource_user_id,
|
||||
// parameters.sixaxis_handle);
|
||||
// std::shared_ptr<SixAxisSensorState> state = nullptr;
|
||||
// const auto sixaxis = GetResourceManager()->GetSevenSixAxis();
|
||||
// Result result = sixaxis->GetSensorState(state, parameters.applet_resource_user_id,
|
||||
// parameters.sixaxis_handle);
|
||||
|
||||
//if (result.IsSuccess()) {
|
||||
// result = GetResourceManager()->GetConsoleSixAxis()->ResetSevenSixAxisSensorTimestamp();
|
||||
//}
|
||||
// if (result.IsSuccess()) {
|
||||
// result = GetResourceManager()->GetConsoleSixAxis()->ResetSevenSixAxisSensorTimestamp();
|
||||
// }
|
||||
|
||||
//if (result.IsSuccess()) {
|
||||
// state->SetRunningState(true);
|
||||
//}
|
||||
// if (result.IsSuccess()) {
|
||||
// state->SetRunningState(true);
|
||||
// }
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
|
@ -2224,14 +2223,14 @@ void IHidServer::FinalizeSevenSixAxisSensor(HLERequestContext& ctx) {
|
|||
|
||||
std::shared_ptr<SixAxisSensorState> state = nullptr;
|
||||
const auto sixaxis = GetResourceManager()->GetSevenSixAxis();
|
||||
//Result result = sixaxis->GetSensorState(state, parameters.applet_resource_user_id,
|
||||
// parameters.sixaxis_handle);
|
||||
// Result result = sixaxis->GetSensorState(state, parameters.applet_resource_user_id,
|
||||
// parameters.sixaxis_handle);
|
||||
|
||||
//if (result.IsSuccess()) {
|
||||
// state->SetRunningState(false);
|
||||
//}
|
||||
// if (result.IsSuccess()) {
|
||||
// state->SetRunningState(false);
|
||||
// }
|
||||
|
||||
// result = GetResourceManager()->GetConsoleSixAxis()->FinalizeSevenSixAxisSensor();
|
||||
// result = GetResourceManager()->GetConsoleSixAxis()->FinalizeSevenSixAxisSensor();
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
|
@ -2242,7 +2241,6 @@ void IHidServer::GetSevenSixAxisSensorFusionStrength(HLERequestContext& ctx) {}
|
|||
|
||||
void IHidServer::ResetSevenSixAxisSensorTimestamp(HLERequestContext& ctx) {}
|
||||
|
||||
|
||||
void IHidServer::IsUsbFullKeyControllerEnabled(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const bool is_enabled = false;
|
||||
|
@ -2798,8 +2796,7 @@ void IHidServer::GetNpadCommunicationMode(HLERequestContext& ctx) {
|
|||
IPC::RequestParser rp{ctx};
|
||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||
|
||||
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);
|
||||
|
||||
// This function has been stubbed since 2.0.0+
|
||||
|
||||
|
@ -2825,11 +2822,11 @@ void IHidServer::SetTouchScreenConfiguration(HLERequestContext& ctx) {
|
|||
touchscreen_mode.mode = TouchScreenModeForNx::UseSystemSetting;
|
||||
}
|
||||
|
||||
//const Result result =
|
||||
// GetResourceManager()->GetTouchScreen()->SetTouchScreenConfiguration(touchscreen_mode);
|
||||
// const Result result =
|
||||
// GetResourceManager()->GetTouchScreen()->SetTouchScreenConfiguration(touchscreen_mode);
|
||||
|
||||
//IPC::ResponseBuilder rb{ctx, 2};
|
||||
//rb.Push(result);
|
||||
// IPC::ResponseBuilder rb{ctx, 2};
|
||||
// rb.Push(result);
|
||||
}
|
||||
|
||||
void IHidServer::IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx) {
|
||||
|
@ -2855,9 +2852,7 @@ void IHidServer::IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx) {
|
|||
rb.Push(needs_update);
|
||||
}
|
||||
|
||||
void IHidServer::ActivateDigitizer(HLERequestContext& ctx) {
|
||||
|
||||
}
|
||||
void IHidServer::ActivateDigitizer(HLERequestContext& ctx) {}
|
||||
|
||||
bool IHidServer::IsDeviceManaged() {
|
||||
InitializeDebugSettings();
|
||||
|
@ -2903,14 +2898,13 @@ void IHidServer::InitializeDebugSettings() {
|
|||
|
||||
is_firmware_update_failure = {};
|
||||
if (is_firmware_update_failure_emulated) {
|
||||
const std::size_t size =
|
||||
0; // GetSettingsItemValueSize("hid_debug", "firmware_update_failure");
|
||||
if (size != 0) {
|
||||
[[maybe_unused]] const std::size_t setting_size =
|
||||
std::min(size, is_firmware_update_failure.size());
|
||||
// nn::settings::fwdbg::GetSettingsItemValue(&is_firmware_update_failure, setting_size,
|
||||
// "hid_debug", "firmware_update_failure");
|
||||
}
|
||||
const std::size_t size = 0; // GetSettingsItemValueSize("hid_debug",
|
||||
// "firmware_update_failure"); if (size != 0) {
|
||||
[[maybe_unused]] const std::size_t setting_size =
|
||||
std::min(size, is_firmware_update_failure.size());
|
||||
// nn::settings::fwdbg::GetSettingsItemValue(&is_firmware_update_failure, setting_size,
|
||||
// "hid_debug", "firmware_update_failure");
|
||||
//}
|
||||
}
|
||||
|
||||
is_ble_disabled = false;
|
||||
|
|
|
@ -266,7 +266,7 @@ void IHidSystemServer::GetLastActiveNpad(HLERequestContext& ctx) {
|
|||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(result);
|
||||
// rb.PushEnum(ResultSuccess);
|
||||
// rb.PushEnum(ResultSuccess);
|
||||
}
|
||||
|
||||
void IHidSystemServer::ApplyNpadSystemCommonPolicyFull(HLERequestContext& ctx) {
|
||||
|
@ -365,34 +365,34 @@ void IHidSystemServer::SetTouchScreenDefaultConfiguration(HLERequestContext& ctx
|
|||
break;
|
||||
default:
|
||||
touch_screen_configuration.mode = TouchScreenModeForNx::UseSystemSetting;
|
||||
}/*
|
||||
} /*
|
||||
|
||||
const Result result = GetResourceManager()->GetTouchScreen()->SetTouchScreenConfiguration(
|
||||
touch_screen_configuration);
|
||||
const Result result = GetResourceManager()->GetTouchScreen()->SetTouchScreenConfiguration(
|
||||
touch_screen_configuration);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(result);*/
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(result);*/
|
||||
}
|
||||
|
||||
void IHidSystemServer::GetTouchScreenDefaultConfiguration(HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_HID, "(STUBBED) called");
|
||||
|
||||
//TouchScreenConfigurationForNx touch_screen_configuration{};
|
||||
//const Result result = GetResourceManager()->GetTouchScreen()->GetTouchScreenConfiguration(
|
||||
// touch_screen_configuration.mode);
|
||||
// TouchScreenConfigurationForNx touch_screen_configuration{};
|
||||
// const Result result = GetResourceManager()->GetTouchScreen()->GetTouchScreenConfiguration(
|
||||
// touch_screen_configuration.mode);
|
||||
|
||||
//switch (touch_screen_configuration.mode) {
|
||||
//case TouchScreenModeForNx::UseSystemSetting:
|
||||
//case TouchScreenModeForNx::Finger:
|
||||
//case TouchScreenModeForNx::Heat2:
|
||||
// break;
|
||||
//default:
|
||||
// touch_screen_configuration.mode = TouchScreenModeForNx::UseSystemSetting;
|
||||
//}
|
||||
// switch (touch_screen_configuration.mode) {
|
||||
// case TouchScreenModeForNx::UseSystemSetting:
|
||||
// case TouchScreenModeForNx::Finger:
|
||||
// case TouchScreenModeForNx::Heat2:
|
||||
// break;
|
||||
// default:
|
||||
// touch_screen_configuration.mode = TouchScreenModeForNx::UseSystemSetting;
|
||||
// }
|
||||
|
||||
//IPC::ResponseBuilder rb{ctx, 6};
|
||||
//rb.Push(ResultSuccess);
|
||||
//rb.PushRaw(touch_screen_configuration);
|
||||
// IPC::ResponseBuilder rb{ctx, 6};
|
||||
// rb.Push(ResultSuccess);
|
||||
// rb.PushRaw(touch_screen_configuration);
|
||||
}
|
||||
|
||||
std::shared_ptr<ResourceManager> IHidSystemServer::GetResourceManager() {
|
||||
|
|
|
@ -194,7 +194,6 @@ std::shared_ptr<SixAxis> ResourceManager::GetSixAxis() {
|
|||
return sixaxis;
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<SixAxis> ResourceManager::GetConsoleSixAxis() {
|
||||
return sixaxis;
|
||||
}
|
||||
|
|
|
@ -11,8 +11,7 @@ namespace Core {
|
|||
class System;
|
||||
}
|
||||
|
||||
namespace Service::HID {
|
||||
} // namespace Service::HID
|
||||
namespace Service::HID {} // namespace Service::HID
|
||||
|
||||
namespace Service::HID {
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@ namespace Core {
|
|||
class System;
|
||||
}
|
||||
|
||||
namespace Service::HID {
|
||||
} // namespace Service::HID
|
||||
namespace Service::HID {} // namespace Service::HID
|
||||
|
||||
namespace Service::HID {
|
||||
|
||||
|
|
|
@ -11,8 +11,7 @@ namespace Core {
|
|||
class System;
|
||||
}
|
||||
|
||||
namespace Service::HID {
|
||||
} // namespace Service::HID
|
||||
namespace Service::HID {} // namespace Service::HID
|
||||
|
||||
namespace Service::HID {
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ bool Npad::IsFirmwareUpdateAvailableForSixAxisSensor(const SixAxisSensorHandle&
|
|||
|
||||
Result Npad::ResetIsSixAxisSensorDeviceNewlyAssigned(const u64 aruid,
|
||||
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
|
||||
|
||||
|
|
|
@ -65,9 +65,7 @@ private:
|
|||
};
|
||||
static_assert(sizeof(BatteryState) == 0x40, "BatteryState is an invalid size");
|
||||
|
||||
struct Unknown0x88 {
|
||||
|
||||
};
|
||||
struct Unknown0x88 {};
|
||||
|
||||
struct AbstractState {
|
||||
INSERT_PADDING_BYTES(0x88);
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
int exec() override;
|
||||
|
||||
void keyPressEvent(QKeyEvent* evt) override;
|
||||
//void keyPressEvent(QKeyEvent* evt) override;
|
||||
|
||||
private:
|
||||
// Applies the current configuration.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue