service: am: Implement remaining am functions needed by Qlaunch
This commit is contained in:
@ -439,6 +439,8 @@ add_library(core STATIC
|
|||||||
hle/service/am/audio_controller.h
|
hle/service/am/audio_controller.h
|
||||||
hle/service/am/common_state_getter.cpp
|
hle/service/am/common_state_getter.cpp
|
||||||
hle/service/am/common_state_getter.h
|
hle/service/am/common_state_getter.h
|
||||||
|
hle/service/am/cradle_firmware_updater.cpp
|
||||||
|
hle/service/am/cradle_firmware_updater.h
|
||||||
hle/service/am/debug_functions.cpp
|
hle/service/am/debug_functions.cpp
|
||||||
hle/service/am/debug_functions.h
|
hle/service/am/debug_functions.h
|
||||||
hle/service/am/display_controller.cpp
|
hle/service/am/display_controller.cpp
|
||||||
|
@ -206,6 +206,41 @@ void PushInShowSoftwareKeyboard(Core::System& system, AppletStorageChannel& chan
|
|||||||
channel.Push(std::make_shared<IStorage>(system, std::move(work_buffer)));
|
channel.Push(std::make_shared<IStorage>(system, std::move(work_buffer)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PushInShowMyPageData(Core::System& system, AppletStorageChannel& channel) {
|
||||||
|
const CommonArguments arguments{
|
||||||
|
.arguments_version = CommonArgumentVersion::Version3,
|
||||||
|
.size = CommonArgumentSize::Version3,
|
||||||
|
.library_version = 0,
|
||||||
|
.theme_color = ThemeColor::BasicBlack,
|
||||||
|
.play_startup_sound = true,
|
||||||
|
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||||
|
};
|
||||||
|
|
||||||
|
std::vector<u8> argument_data(sizeof(arguments));
|
||||||
|
std::vector<u8> settings_data{0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE,
|
||||||
|
0x9E, 0xF8, 0xAF, 0xB1, 0xE8, 0x95, 0x90, 0x33, 0x6C,
|
||||||
|
0x0B, 0x22, 0x70, 0x07, 0xF4, 0xBB, 0x00};
|
||||||
|
settings_data.resize(0x10a8);
|
||||||
|
std::memcpy(argument_data.data(), &arguments, sizeof(arguments));
|
||||||
|
|
||||||
|
channel.Push(std::make_shared<IStorage>(system, std::move(argument_data)));
|
||||||
|
channel.Push(std::make_shared<IStorage>(system, std::move(settings_data)));
|
||||||
|
}
|
||||||
|
void PushInShowQlaunch(Core::System& system, AppletStorageChannel& channel) {
|
||||||
|
const CommonArguments arguments{
|
||||||
|
.arguments_version = CommonArgumentVersion::Version3,
|
||||||
|
.size = CommonArgumentSize::Version3,
|
||||||
|
.library_version = 0,
|
||||||
|
.theme_color = ThemeColor::BasicBlack,
|
||||||
|
.play_startup_sound = true,
|
||||||
|
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||||
|
};
|
||||||
|
|
||||||
|
std::vector<u8> argument_data(sizeof(arguments));
|
||||||
|
std::memcpy(argument_data.data(), &arguments, sizeof(arguments));
|
||||||
|
channel.Push(std::make_shared<IStorage>(system, std::move(argument_data)));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
AppletManager::AppletManager(Core::System& system) : m_system(system) {}
|
AppletManager::AppletManager(Core::System& system) : m_system(system) {}
|
||||||
@ -298,6 +333,12 @@ void AppletManager::CreateAndInsertByFrontendAppletParameters(
|
|||||||
case AppletId::Controller:
|
case AppletId::Controller:
|
||||||
PushInShowController(m_system, InitializeFakeCallerApplet(m_system, applet));
|
PushInShowController(m_system, InitializeFakeCallerApplet(m_system, applet));
|
||||||
break;
|
break;
|
||||||
|
case AppletId::MyPage:
|
||||||
|
PushInShowMyPageData(m_system, InitializeFakeCallerApplet(m_system, applet));
|
||||||
|
break;
|
||||||
|
case AppletId::QLaunch:
|
||||||
|
PushInShowQlaunch(m_system, InitializeFakeCallerApplet(m_system, applet));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr<Ap
|
|||||||
{20, nullptr, "PushToGeneralChannel"},
|
{20, nullptr, "PushToGeneralChannel"},
|
||||||
{30, nullptr, "GetHomeButtonReaderLockAccessor"},
|
{30, nullptr, "GetHomeButtonReaderLockAccessor"},
|
||||||
{31, &ICommonStateGetter::GetReaderLockAccessorEx, "GetReaderLockAccessorEx"},
|
{31, &ICommonStateGetter::GetReaderLockAccessorEx, "GetReaderLockAccessorEx"},
|
||||||
{32, nullptr, "GetWriterLockAccessorEx"},
|
{32, &ICommonStateGetter::GetWriterLockAccessorEx, "GetWriterLockAccessorEx"},
|
||||||
{40, nullptr, "GetCradleFwVersion"},
|
{40, nullptr, "GetCradleFwVersion"},
|
||||||
{50, &ICommonStateGetter::IsVrModeEnabled, "IsVrModeEnabled"},
|
{50, &ICommonStateGetter::IsVrModeEnabled, "IsVrModeEnabled"},
|
||||||
{51, &ICommonStateGetter::SetVrModeEnabled, "SetVrModeEnabled"},
|
{51, &ICommonStateGetter::SetVrModeEnabled, "SetVrModeEnabled"},
|
||||||
@ -61,7 +61,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr<Ap
|
|||||||
{100, nullptr, "SetHandlingHomeButtonShortPressedEnabled"},
|
{100, nullptr, "SetHandlingHomeButtonShortPressedEnabled"},
|
||||||
{110, nullptr, "OpenMyGpuErrorHandler"},
|
{110, nullptr, "OpenMyGpuErrorHandler"},
|
||||||
{120, &ICommonStateGetter::GetAppletLaunchedHistory, "GetAppletLaunchedHistory"},
|
{120, &ICommonStateGetter::GetAppletLaunchedHistory, "GetAppletLaunchedHistory"},
|
||||||
{200, nullptr, "GetOperationModeSystemInfo"},
|
{200, &ICommonStateGetter::GetOperationModeSystemInfo, "GetOperationModeSystemInfo"},
|
||||||
{300, &ICommonStateGetter::GetSettingsPlatformRegion, "GetSettingsPlatformRegion"},
|
{300, &ICommonStateGetter::GetSettingsPlatformRegion, "GetSettingsPlatformRegion"},
|
||||||
{400, nullptr, "ActivateMigrationService"},
|
{400, nullptr, "ActivateMigrationService"},
|
||||||
{401, nullptr, "DeactivateMigrationService"},
|
{401, nullptr, "DeactivateMigrationService"},
|
||||||
@ -160,6 +160,15 @@ void ICommonStateGetter::GetReaderLockAccessorEx(HLERequestContext& ctx) {
|
|||||||
rb.PushIpcInterface<ILockAccessor>(system);
|
rb.PushIpcInterface<ILockAccessor>(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ICommonStateGetter::GetWriterLockAccessorEx(HLERequestContext& ctx) {
|
||||||
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.PushIpcInterface<ILockAccessor>(system);
|
||||||
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetAcquiredSleepLockEvent(HLERequestContext& ctx) {
|
void ICommonStateGetter::GetAcquiredSleepLockEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "called");
|
LOG_WARNING(Service_AM, "called");
|
||||||
|
|
||||||
@ -271,6 +280,14 @@ void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(HLERequestContext&
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ICommonStateGetter::GetOperationModeSystemInfo(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.Push(0);
|
||||||
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::GetAppletLaunchedHistory(HLERequestContext& ctx) {
|
void ICommonStateGetter::GetAppletLaunchedHistory(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ private:
|
|||||||
void RequestToAcquireSleepLock(HLERequestContext& ctx);
|
void RequestToAcquireSleepLock(HLERequestContext& ctx);
|
||||||
void GetAcquiredSleepLockEvent(HLERequestContext& ctx);
|
void GetAcquiredSleepLockEvent(HLERequestContext& ctx);
|
||||||
void GetReaderLockAccessorEx(HLERequestContext& ctx);
|
void GetReaderLockAccessorEx(HLERequestContext& ctx);
|
||||||
|
void GetWriterLockAccessorEx(HLERequestContext& ctx);
|
||||||
void GetDefaultDisplayResolutionChangeEvent(HLERequestContext& ctx);
|
void GetDefaultDisplayResolutionChangeEvent(HLERequestContext& ctx);
|
||||||
void GetOperationMode(HLERequestContext& ctx);
|
void GetOperationMode(HLERequestContext& ctx);
|
||||||
void GetPerformanceMode(HLERequestContext& ctx);
|
void GetPerformanceMode(HLERequestContext& ctx);
|
||||||
@ -68,6 +69,7 @@ private:
|
|||||||
void GetBuiltInDisplayType(HLERequestContext& ctx);
|
void GetBuiltInDisplayType(HLERequestContext& ctx);
|
||||||
void PerformSystemButtonPressingIfInFocus(HLERequestContext& ctx);
|
void PerformSystemButtonPressingIfInFocus(HLERequestContext& ctx);
|
||||||
void GetAppletLaunchedHistory(HLERequestContext& ctx);
|
void GetAppletLaunchedHistory(HLERequestContext& ctx);
|
||||||
|
void GetOperationModeSystemInfo(HLERequestContext& ctx);
|
||||||
void GetSettingsPlatformRegion(HLERequestContext& ctx);
|
void GetSettingsPlatformRegion(HLERequestContext& ctx);
|
||||||
void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(HLERequestContext& ctx);
|
void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(HLERequestContext& ctx);
|
||||||
|
|
||||||
|
57
src/core/hle/service/am/cradle_firmware_updater.cpp
Normal file
57
src/core/hle/service/am/cradle_firmware_updater.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "core/hle/service/am/cradle_firmware_updater.h"
|
||||||
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
|
namespace Service::AM {
|
||||||
|
|
||||||
|
ICradleFirmwareUpdater::ICradleFirmwareUpdater(Core::System& system_)
|
||||||
|
: ServiceFramework{system_, "ICradleFirmwareUpdater"},
|
||||||
|
service_context{system, "IHomeMenuFunctions"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "StartUpdate"},
|
||||||
|
{1, &ICradleFirmwareUpdater::FinishUpdate, "FinishUpdate"},
|
||||||
|
{2, &ICradleFirmwareUpdater::GetCradleDeviceInfo, "GetCradleDeviceInfo"},
|
||||||
|
{3, &ICradleFirmwareUpdater::GetCradleDeviceInfoChangeEvent, "GetCradleDeviceInfoChangeEvent"},
|
||||||
|
{4, nullptr, "GetUpdateProgressInfo"},
|
||||||
|
{5, nullptr, "GetLastInternalResult"},
|
||||||
|
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
|
||||||
|
cradle_device_info_event =
|
||||||
|
service_context.CreateEvent("IHomeMenuFunctions:PopFromGeneralChannelEvent");
|
||||||
|
}
|
||||||
|
|
||||||
|
ICradleFirmwareUpdater::~ICradleFirmwareUpdater() {
|
||||||
|
service_context.CloseEvent(cradle_device_info_event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ICradleFirmwareUpdater::FinishUpdate(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
void ICradleFirmwareUpdater::GetCradleDeviceInfo(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 5};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.Push<u64>(0);
|
||||||
|
rb.Push<u32>(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ICradleFirmwareUpdater::GetCradleDeviceInfoChangeEvent(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.PushCopyObjects(cradle_device_info_event->GetReadableEvent());
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service::AM
|
25
src/core/hle/service/am/cradle_firmware_updater.h
Normal file
25
src/core/hle/service/am/cradle_firmware_updater.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/kernel_helpers.h"
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
|
namespace Service::AM {
|
||||||
|
|
||||||
|
class ICradleFirmwareUpdater final : public ServiceFramework<ICradleFirmwareUpdater> {
|
||||||
|
public:
|
||||||
|
explicit ICradleFirmwareUpdater(Core::System& system_);
|
||||||
|
~ICradleFirmwareUpdater() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void FinishUpdate(HLERequestContext& ctx);
|
||||||
|
void GetCradleDeviceInfo(HLERequestContext& ctx);
|
||||||
|
void GetCradleDeviceInfoChangeEvent(HLERequestContext& ctx);
|
||||||
|
|
||||||
|
Kernel::KEvent* cradle_device_info_event;
|
||||||
|
KernelHelpers::ServiceContext service_context;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Service::AM
|
@ -1,13 +1,15 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "core/hle/service/am/cradle_firmware_updater.h"
|
||||||
#include "core/hle/service/am/global_state_controller.h"
|
#include "core/hle/service/am/global_state_controller.h"
|
||||||
#include "core/hle/service/ipc_helpers.h"
|
#include "core/hle/service/ipc_helpers.h"
|
||||||
|
|
||||||
namespace Service::AM {
|
namespace Service::AM {
|
||||||
|
|
||||||
IGlobalStateController::IGlobalStateController(Core::System& system_)
|
IGlobalStateController::IGlobalStateController(Core::System& system_)
|
||||||
: ServiceFramework{system_, "IGlobalStateController"} {
|
: ServiceFramework{system_, "IGlobalStateController"},
|
||||||
|
service_context{system_, "IGlobalStateController"} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, nullptr, "RequestToEnterSleep"},
|
{0, nullptr, "RequestToEnterSleep"},
|
||||||
@ -16,19 +18,53 @@ IGlobalStateController::IGlobalStateController(Core::System& system_)
|
|||||||
{3, nullptr, "StartShutdownSequence"},
|
{3, nullptr, "StartShutdownSequence"},
|
||||||
{4, nullptr, "StartRebootSequence"},
|
{4, nullptr, "StartRebootSequence"},
|
||||||
{9, nullptr, "IsAutoPowerDownRequested"},
|
{9, nullptr, "IsAutoPowerDownRequested"},
|
||||||
{10, nullptr, "LoadAndApplyIdlePolicySettings"},
|
{10, &IGlobalStateController::LoadAndApplyIdlePolicySettings, "LoadAndApplyIdlePolicySettings"},
|
||||||
{11, nullptr, "NotifyCecSettingsChanged"},
|
{11, nullptr, "NotifyCecSettingsChanged"},
|
||||||
{12, nullptr, "SetDefaultHomeButtonLongPressTime"},
|
{12, nullptr, "SetDefaultHomeButtonLongPressTime"},
|
||||||
{13, nullptr, "UpdateDefaultDisplayResolution"},
|
{13, nullptr, "UpdateDefaultDisplayResolution"},
|
||||||
{14, nullptr, "ShouldSleepOnBoot"},
|
{14, &IGlobalStateController::ShouldSleepOnBoot, "ShouldSleepOnBoot"},
|
||||||
{15, nullptr, "GetHdcpAuthenticationFailedEvent"},
|
{15, &IGlobalStateController::GetHdcpAuthenticationFailedEvent, "GetHdcpAuthenticationFailedEvent"},
|
||||||
{30, nullptr, "OpenCradleFirmwareUpdater"},
|
{30, &IGlobalStateController::OpenCradleFirmwareUpdater, "OpenCradleFirmwareUpdater"},
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
|
|
||||||
|
hdcp_authentification_failed_event =
|
||||||
|
service_context.CreateEvent("IGlobalStateController::HdcpAuthenticationFailedEvent");
|
||||||
}
|
}
|
||||||
|
|
||||||
IGlobalStateController::~IGlobalStateController() = default;
|
IGlobalStateController::~IGlobalStateController() = default;
|
||||||
|
|
||||||
|
void IGlobalStateController::LoadAndApplyIdlePolicySettings(HLERequestContext& ctx) {
|
||||||
|
LOG_ERROR(Service_AM, "called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IGlobalStateController::ShouldSleepOnBoot(HLERequestContext& ctx) {
|
||||||
|
LOG_ERROR(Service_AM, "called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.Push(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IGlobalStateController::GetHdcpAuthenticationFailedEvent(HLERequestContext& ctx) {
|
||||||
|
LOG_ERROR(Service_AM, "called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.PushCopyObjects(hdcp_authentification_failed_event->GetReadableEvent());
|
||||||
|
}
|
||||||
|
|
||||||
|
void IGlobalStateController::OpenCradleFirmwareUpdater(HLERequestContext& ctx) {
|
||||||
|
LOG_ERROR(Service_AM, "called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.PushIpcInterface<ICradleFirmwareUpdater>(system);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::AM
|
} // namespace Service::AM
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/hle/service/kernel_helpers.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
namespace Service::AM {
|
namespace Service::AM {
|
||||||
@ -11,6 +12,15 @@ class IGlobalStateController final : public ServiceFramework<IGlobalStateControl
|
|||||||
public:
|
public:
|
||||||
explicit IGlobalStateController(Core::System& system_);
|
explicit IGlobalStateController(Core::System& system_);
|
||||||
~IGlobalStateController() override;
|
~IGlobalStateController() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void LoadAndApplyIdlePolicySettings(HLERequestContext& ctx);
|
||||||
|
void ShouldSleepOnBoot(HLERequestContext& ctx);
|
||||||
|
void GetHdcpAuthenticationFailedEvent(HLERequestContext& ctx);
|
||||||
|
void OpenCradleFirmwareUpdater(HLERequestContext& ctx);
|
||||||
|
|
||||||
|
Kernel::KEvent* hdcp_authentification_failed_event;
|
||||||
|
KernelHelpers::ServiceContext service_context;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Service::AM
|
} // namespace Service::AM
|
||||||
|
@ -12,14 +12,14 @@ IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_)
|
|||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"},
|
{10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"},
|
||||||
{11, nullptr, "LockForeground"},
|
{11, &IHomeMenuFunctions::LockForeground, "LockForeground"},
|
||||||
{12, nullptr, "UnlockForeground"},
|
{12, &IHomeMenuFunctions::UnlockForeground, "UnlockForeground"},
|
||||||
{20, nullptr, "PopFromGeneralChannel"},
|
{20, nullptr, "PopFromGeneralChannel"},
|
||||||
{21, &IHomeMenuFunctions::GetPopFromGeneralChannelEvent, "GetPopFromGeneralChannelEvent"},
|
{21, &IHomeMenuFunctions::GetPopFromGeneralChannelEvent, "GetPopFromGeneralChannelEvent"},
|
||||||
{30, nullptr, "GetHomeButtonWriterLockAccessor"},
|
{30, nullptr, "GetHomeButtonWriterLockAccessor"},
|
||||||
{31, nullptr, "GetWriterLockAccessorEx"},
|
{31, nullptr, "GetWriterLockAccessorEx"},
|
||||||
{40, nullptr, "IsSleepEnabled"},
|
{40, nullptr, "IsSleepEnabled"},
|
||||||
{41, nullptr, "IsRebootEnabled"},
|
{41, &IHomeMenuFunctions::IsRebootEnabled, "IsRebootEnabled"},
|
||||||
{50, nullptr, "LaunchSystemApplet"},
|
{50, nullptr, "LaunchSystemApplet"},
|
||||||
{51, nullptr, "LaunchStarter"},
|
{51, nullptr, "LaunchStarter"},
|
||||||
{100, nullptr, "PopRequestLaunchApplicationForDebug"},
|
{100, nullptr, "PopRequestLaunchApplicationForDebug"},
|
||||||
@ -46,6 +46,20 @@ void IHomeMenuFunctions::RequestToGetForeground(HLERequestContext& ctx) {
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IHomeMenuFunctions::LockForeground(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IHomeMenuFunctions::UnlockForeground(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(HLERequestContext& ctx) {
|
void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
@ -54,4 +68,12 @@ void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(HLERequestContext& ctx) {
|
|||||||
rb.PushCopyObjects(pop_from_general_channel_event->GetReadableEvent());
|
rb.PushCopyObjects(pop_from_general_channel_event->GetReadableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IHomeMenuFunctions::IsRebootEnabled(HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.Push<u8>(true);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Service::AM
|
} // namespace Service::AM
|
||||||
|
@ -15,7 +15,10 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void RequestToGetForeground(HLERequestContext& ctx);
|
void RequestToGetForeground(HLERequestContext& ctx);
|
||||||
|
void LockForeground(HLERequestContext& ctx);
|
||||||
|
void UnlockForeground(HLERequestContext& ctx);
|
||||||
void GetPopFromGeneralChannelEvent(HLERequestContext& ctx);
|
void GetPopFromGeneralChannelEvent(HLERequestContext& ctx);
|
||||||
|
void IsRebootEnabled(HLERequestContext& ctx);
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet>
|
|||||||
{46, nullptr, "SetRecordingLayerCompositionEnabled"},
|
{46, nullptr, "SetRecordingLayerCompositionEnabled"},
|
||||||
{50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"},
|
{50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"},
|
||||||
{51, &ISelfController::ApproveToDisplay, "ApproveToDisplay"},
|
{51, &ISelfController::ApproveToDisplay, "ApproveToDisplay"},
|
||||||
{60, nullptr, "OverrideAutoSleepTimeAndDimmingTime"},
|
{60, &ISelfController::OverrideAutoSleepTimeAndDimmingTime, "OverrideAutoSleepTimeAndDimmingTime"},
|
||||||
{61, &ISelfController::SetMediaPlaybackState, "SetMediaPlaybackState"},
|
{61, &ISelfController::SetMediaPlaybackState, "SetMediaPlaybackState"},
|
||||||
{62, &ISelfController::SetIdleTimeDetectionExtension, "SetIdleTimeDetectionExtension"},
|
{62, &ISelfController::SetIdleTimeDetectionExtension, "SetIdleTimeDetectionExtension"},
|
||||||
{63, &ISelfController::GetIdleTimeDetectionExtension, "GetIdleTimeDetectionExtension"},
|
{63, &ISelfController::GetIdleTimeDetectionExtension, "GetIdleTimeDetectionExtension"},
|
||||||
@ -61,7 +61,7 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet>
|
|||||||
{69, &ISelfController::IsAutoSleepDisabled, "IsAutoSleepDisabled"},
|
{69, &ISelfController::IsAutoSleepDisabled, "IsAutoSleepDisabled"},
|
||||||
{70, nullptr, "ReportMultimediaError"},
|
{70, nullptr, "ReportMultimediaError"},
|
||||||
{71, nullptr, "GetCurrentIlluminanceEx"},
|
{71, nullptr, "GetCurrentIlluminanceEx"},
|
||||||
{72, nullptr, "SetInputDetectionPolicy"},
|
{72, &ISelfController::SetInputDetectionPolicy, "SetInputDetectionPolicy"},
|
||||||
{80, nullptr, "SetWirelessPriorityMode"},
|
{80, nullptr, "SetWirelessPriorityMode"},
|
||||||
{90, &ISelfController::GetAccumulatedSuspendedTickValue, "GetAccumulatedSuspendedTickValue"},
|
{90, &ISelfController::GetAccumulatedSuspendedTickValue, "GetAccumulatedSuspendedTickValue"},
|
||||||
{91, &ISelfController::GetAccumulatedSuspendedTickChangedEvent, "GetAccumulatedSuspendedTickChangedEvent"},
|
{91, &ISelfController::GetAccumulatedSuspendedTickChangedEvent, "GetAccumulatedSuspendedTickChangedEvent"},
|
||||||
@ -327,6 +327,18 @@ void ISelfController::ApproveToDisplay(HLERequestContext& ctx) {
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ISelfController::OverrideAutoSleepTimeAndDimmingTime(HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto a = rp.Pop<u32>();
|
||||||
|
const auto b = rp.Pop<u32>();
|
||||||
|
const auto c = rp.Pop<u32>();
|
||||||
|
const auto d = rp.Pop<u32>();
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called, a={}, b={}, c={}, d={}", a, b, c, d);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
void ISelfController::SetMediaPlaybackState(HLERequestContext& ctx) {
|
void ISelfController::SetMediaPlaybackState(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const u8 state = rp.Pop<u8>();
|
const u8 state = rp.Pop<u8>();
|
||||||
@ -399,6 +411,13 @@ void ISelfController::IsAutoSleepDisabled(HLERequestContext& ctx) {
|
|||||||
rb.Push(applet->auto_sleep_disabled);
|
rb.Push(applet->auto_sleep_disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ISelfController::SetInputDetectionPolicy(HLERequestContext& ctx) {
|
||||||
|
LOG_ERROR(Service_AM, "called.");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
void ISelfController::GetAccumulatedSuspendedTickValue(HLERequestContext& ctx) {
|
void ISelfController::GetAccumulatedSuspendedTickValue(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_AM, "called.");
|
LOG_DEBUG(Service_AM, "called.");
|
||||||
|
|
||||||
|
@ -39,12 +39,14 @@ private:
|
|||||||
void CreateManagedDisplaySeparableLayer(HLERequestContext& ctx);
|
void CreateManagedDisplaySeparableLayer(HLERequestContext& ctx);
|
||||||
void SetHandlesRequestToDisplay(HLERequestContext& ctx);
|
void SetHandlesRequestToDisplay(HLERequestContext& ctx);
|
||||||
void ApproveToDisplay(HLERequestContext& ctx);
|
void ApproveToDisplay(HLERequestContext& ctx);
|
||||||
|
void OverrideAutoSleepTimeAndDimmingTime(HLERequestContext& ctx);
|
||||||
void SetMediaPlaybackState(HLERequestContext& ctx);
|
void SetMediaPlaybackState(HLERequestContext& ctx);
|
||||||
void SetIdleTimeDetectionExtension(HLERequestContext& ctx);
|
void SetIdleTimeDetectionExtension(HLERequestContext& ctx);
|
||||||
void GetIdleTimeDetectionExtension(HLERequestContext& ctx);
|
void GetIdleTimeDetectionExtension(HLERequestContext& ctx);
|
||||||
void ReportUserIsActive(HLERequestContext& ctx);
|
void ReportUserIsActive(HLERequestContext& ctx);
|
||||||
void SetAutoSleepDisabled(HLERequestContext& ctx);
|
void SetAutoSleepDisabled(HLERequestContext& ctx);
|
||||||
void IsAutoSleepDisabled(HLERequestContext& ctx);
|
void IsAutoSleepDisabled(HLERequestContext& ctx);
|
||||||
|
void SetInputDetectionPolicy(HLERequestContext& ctx);
|
||||||
void GetAccumulatedSuspendedTickValue(HLERequestContext& ctx);
|
void GetAccumulatedSuspendedTickValue(HLERequestContext& ctx);
|
||||||
void GetAccumulatedSuspendedTickChangedEvent(HLERequestContext& ctx);
|
void GetAccumulatedSuspendedTickChangedEvent(HLERequestContext& ctx);
|
||||||
void SetAlbumImageTakenNotificationEnabled(HLERequestContext& ctx);
|
void SetAlbumImageTakenNotificationEnabled(HLERequestContext& ctx);
|
||||||
|
Reference in New Issue
Block a user