rebase to latest master
This commit is contained in:
@@ -2,13 +2,13 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "core/core.h"
|
#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.h"
|
||||||
#include "core/hle/service/hid/hid_debug_server.h"
|
#include "core/hle/service/hid/hid_debug_server.h"
|
||||||
#include "core/hle/service/hid/hid_server.h"
|
#include "core/hle/service/hid/hid_server.h"
|
||||||
#include "core/hle/service/hid/hid_system_server.h"
|
#include "core/hle/service/hid/hid_system_server.h"
|
||||||
#include "core/hle/service/hid/hidbus.h"
|
#include "core/hle/service/hid/hidbus.h"
|
||||||
#include "core/hle/service/hid/irs.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/hid/xcd.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
|
|
||||||
|
@@ -325,8 +325,7 @@ void IHidServer::ActivateKeyboard(HLERequestContext& ctx) {
|
|||||||
rb.Push(result);
|
rb.Push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHidServer::SendKeyboardLockKeyEvent(HLERequestContext& ctx) {
|
void IHidServer::SendKeyboardLockKeyEvent(HLERequestContext& ctx) {}
|
||||||
}
|
|
||||||
|
|
||||||
void IHidServer::AcquireXpadIdEventHandle(HLERequestContext& ctx) {
|
void IHidServer::AcquireXpadIdEventHandle(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
@@ -2129,11 +2128,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);
|
||||||
@@ -2178,11 +2177,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);
|
||||||
@@ -2195,18 +2194,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);
|
||||||
@@ -2224,12 +2223,12 @@ 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();
|
||||||
|
|
||||||
@@ -2242,7 +2241,6 @@ 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;
|
||||||
@@ -2798,8 +2796,7 @@ void IHidServer::GetNpadCommunicationMode(HLERequestContext& ctx) {
|
|||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto applet_resource_user_id{rp.Pop<u64>()};
|
const auto applet_resource_user_id{rp.Pop<u64>()};
|
||||||
|
|
||||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}",
|
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
|
||||||
applet_resource_user_id);
|
|
||||||
|
|
||||||
// This function has been stubbed since 2.0.0+
|
// This function has been stubbed since 2.0.0+
|
||||||
|
|
||||||
@@ -2825,11 +2822,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) {
|
||||||
@@ -2855,9 +2852,7 @@ void IHidServer::IsFirmwareUpdateNeededForNotification(HLERequestContext& ctx) {
|
|||||||
rb.Push(needs_update);
|
rb.Push(needs_update);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IHidServer::ActivateDigitizer(HLERequestContext& ctx) {
|
void IHidServer::ActivateDigitizer(HLERequestContext& ctx) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IHidServer::IsDeviceManaged() {
|
bool IHidServer::IsDeviceManaged() {
|
||||||
InitializeDebugSettings();
|
InitializeDebugSettings();
|
||||||
@@ -2903,14 +2898,13 @@ void IHidServer::InitializeDebugSettings() {
|
|||||||
|
|
||||||
is_firmware_update_failure = {};
|
is_firmware_update_failure = {};
|
||||||
if (is_firmware_update_failure_emulated) {
|
if (is_firmware_update_failure_emulated) {
|
||||||
const std::size_t size =
|
const std::size_t size = 0; // GetSettingsItemValueSize("hid_debug",
|
||||||
0; // GetSettingsItemValueSize("hid_debug", "firmware_update_failure");
|
// "firmware_update_failure"); if (size != 0) {
|
||||||
if (size != 0) {
|
|
||||||
[[maybe_unused]] const std::size_t setting_size =
|
[[maybe_unused]] const std::size_t setting_size =
|
||||||
std::min(size, is_firmware_update_failure.size());
|
std::min(size, is_firmware_update_failure.size());
|
||||||
// nn::settings::fwdbg::GetSettingsItemValue(&is_firmware_update_failure, setting_size,
|
// nn::settings::fwdbg::GetSettingsItemValue(&is_firmware_update_failure, setting_size,
|
||||||
// "hid_debug", "firmware_update_failure");
|
// "hid_debug", "firmware_update_failure");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
is_ble_disabled = false;
|
is_ble_disabled = false;
|
||||||
|
@@ -365,7 +365,7 @@ 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);
|
||||||
@@ -377,22 +377,22 @@ void IHidSystemServer::SetTouchScreenDefaultConfiguration(HLERequestContext& ctx
|
|||||||
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() {
|
||||||
|
@@ -194,7 +194,6 @@ std::shared_ptr<SixAxis> ResourceManager::GetSixAxis() {
|
|||||||
return sixaxis;
|
return sixaxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<SixAxis> ResourceManager::GetConsoleSixAxis() {
|
std::shared_ptr<SixAxis> ResourceManager::GetConsoleSixAxis() {
|
||||||
return sixaxis;
|
return sixaxis;
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,7 @@ namespace Core {
|
|||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::HID {} // namespace Service::HID
|
||||||
} // namespace Service::HID
|
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::HID {
|
||||||
|
|
||||||
|
@@ -11,8 +11,7 @@ namespace Core {
|
|||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::HID {} // namespace Service::HID
|
||||||
} // namespace Service::HID
|
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::HID {
|
||||||
|
|
||||||
|
@@ -11,8 +11,7 @@ namespace Core {
|
|||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Service::HID {
|
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,
|
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
|
||||||
|
|
||||||
|
@@ -65,9 +65,7 @@ private:
|
|||||||
};
|
};
|
||||||
static_assert(sizeof(BatteryState) == 0x40, "BatteryState is an invalid size");
|
static_assert(sizeof(BatteryState) == 0x40, "BatteryState is an invalid size");
|
||||||
|
|
||||||
struct Unknown0x88 {
|
struct Unknown0x88 {};
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AbstractState {
|
struct AbstractState {
|
||||||
INSERT_PADDING_BYTES(0x88);
|
INSERT_PADDING_BYTES(0x88);
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
|
|
||||||
int exec() override;
|
int exec() override;
|
||||||
|
|
||||||
void keyPressEvent(QKeyEvent* evt) override;
|
//void keyPressEvent(QKeyEvent* evt) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Applies the current configuration.
|
// Applies the current configuration.
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user