Merge pull request #8487 from german77/system-button
service: am: Stub PerformSystemButtonPressingIfInFocus
This commit is contained in:
commit
0d5792cc57
@ -686,7 +686,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_,
|
|||||||
{66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"},
|
{66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"},
|
||||||
{67, nullptr, "CancelCpuBoostMode"},
|
{67, nullptr, "CancelCpuBoostMode"},
|
||||||
{68, nullptr, "GetBuiltInDisplayType"},
|
{68, nullptr, "GetBuiltInDisplayType"},
|
||||||
{80, nullptr, "PerformSystemButtonPressingIfInFocus"},
|
{80, &ICommonStateGetter::PerformSystemButtonPressingIfInFocus, "PerformSystemButtonPressingIfInFocus"},
|
||||||
{90, nullptr, "SetPerformanceConfigurationChangedNotification"},
|
{90, nullptr, "SetPerformanceConfigurationChangedNotification"},
|
||||||
{91, nullptr, "GetCurrentPerformanceConfiguration"},
|
{91, nullptr, "GetCurrentPerformanceConfiguration"},
|
||||||
{100, nullptr, "SetHandlingHomeButtonShortPressedEnabled"},
|
{100, nullptr, "SetHandlingHomeButtonShortPressedEnabled"},
|
||||||
@ -826,6 +826,16 @@ void ICommonStateGetter::SetCpuBoostMode(Kernel::HLERequestContext& ctx) {
|
|||||||
apm_sys->SetCpuBoostMode(ctx);
|
apm_sys->SetCpuBoostMode(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto system_button{rp.PopEnum<SystemButtonType>()};
|
||||||
|
|
||||||
|
LOG_WARNING(Service_AM, "(STUBBED) called, system_button={}", system_button);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(
|
void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(
|
||||||
Kernel::HLERequestContext& ctx) {
|
Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
@ -220,6 +220,18 @@ private:
|
|||||||
Docked = 1,
|
Docked = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// This is nn::am::service::SystemButtonType
|
||||||
|
enum class SystemButtonType {
|
||||||
|
None,
|
||||||
|
HomeButtonShortPressing,
|
||||||
|
HomeButtonLongPressing,
|
||||||
|
PowerButtonShortPressing,
|
||||||
|
PowerButtonLongPressing,
|
||||||
|
ShutdownSystem,
|
||||||
|
CaptureButtonShortPressing,
|
||||||
|
CaptureButtonLongPressing,
|
||||||
|
};
|
||||||
|
|
||||||
void GetEventHandle(Kernel::HLERequestContext& ctx);
|
void GetEventHandle(Kernel::HLERequestContext& ctx);
|
||||||
void ReceiveMessage(Kernel::HLERequestContext& ctx);
|
void ReceiveMessage(Kernel::HLERequestContext& ctx);
|
||||||
void GetCurrentFocusState(Kernel::HLERequestContext& ctx);
|
void GetCurrentFocusState(Kernel::HLERequestContext& ctx);
|
||||||
@ -234,6 +246,7 @@ private:
|
|||||||
void EndVrModeEx(Kernel::HLERequestContext& ctx);
|
void EndVrModeEx(Kernel::HLERequestContext& ctx);
|
||||||
void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx);
|
void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx);
|
||||||
void SetCpuBoostMode(Kernel::HLERequestContext& ctx);
|
void SetCpuBoostMode(Kernel::HLERequestContext& ctx);
|
||||||
|
void PerformSystemButtonPressingIfInFocus(Kernel::HLERequestContext& ctx);
|
||||||
void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(Kernel::HLERequestContext& ctx);
|
void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(Kernel::HLERequestContext& ctx);
|
||||||
|
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||||
|
Loading…
Reference in New Issue
Block a user