1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-08-30 07:56:32 -05:00

Implement option to start QLaunch from Tools menu

This commit is contained in:
niansa
2024-03-09 01:28:33 +00:00
committed by Crimson Hawk
parent 362f2047b4
commit 16e19b0b3c
5 changed files with 47 additions and 2 deletions

View File

@@ -15,8 +15,8 @@ IGlobalStateController::IGlobalStateController(Core::System& system_)
{0, nullptr, "RequestToEnterSleep"},
{1, nullptr, "EnterSleep"},
{2, nullptr, "StartSleepSequence"},
{3, nullptr, "StartShutdownSequence"},
{4, nullptr, "StartRebootSequence"},
{3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"},
{4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"},
{9, nullptr, "IsAutoPowerDownRequested"},
{10, D<&IGlobalStateController::LoadAndApplyIdlePolicySettings>, "LoadAndApplyIdlePolicySettings"},
{11, nullptr, "NotifyCecSettingsChanged"},
@@ -31,6 +31,18 @@ IGlobalStateController::IGlobalStateController(Core::System& system_)
RegisterHandlers(functions);
}
Result IGlobalStateController::StartShutdownSequence() {
LOG_INFO(Service_AM, "called");
system.Exit();
R_SUCCEED();
}
Result IGlobalStateController::StartRebootSequence() {
LOG_INFO(Service_AM, "called");
system.Exit();
R_SUCCEED();
}
IGlobalStateController::~IGlobalStateController() = default;
Result IGlobalStateController::LoadAndApplyIdlePolicySettings() {

View File

@@ -18,6 +18,8 @@ public:
~IGlobalStateController() override;
private:
Result StartShutdownSequence();
Result StartRebootSequence();
Result LoadAndApplyIdlePolicySettings();
Result ShouldSleepOnBoot(Out<bool> out_should_sleep_on_boot);
Result GetHdcpAuthenticationFailedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);