summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/am.cpp12
-rw-r--r--src/core/hle/service/am/am.h13
2 files changed, 24 insertions, 1 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 4657bdabc..c4a93e524 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -686,7 +686,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_,
686 {66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"}, 686 {66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"},
687 {67, nullptr, "CancelCpuBoostMode"}, 687 {67, nullptr, "CancelCpuBoostMode"},
688 {68, nullptr, "GetBuiltInDisplayType"}, 688 {68, nullptr, "GetBuiltInDisplayType"},
689 {80, nullptr, "PerformSystemButtonPressingIfInFocus"}, 689 {80, &ICommonStateGetter::PerformSystemButtonPressingIfInFocus, "PerformSystemButtonPressingIfInFocus"},
690 {90, nullptr, "SetPerformanceConfigurationChangedNotification"}, 690 {90, nullptr, "SetPerformanceConfigurationChangedNotification"},
691 {91, nullptr, "GetCurrentPerformanceConfiguration"}, 691 {91, nullptr, "GetCurrentPerformanceConfiguration"},
692 {100, nullptr, "SetHandlingHomeButtonShortPressedEnabled"}, 692 {100, nullptr, "SetHandlingHomeButtonShortPressedEnabled"},
@@ -826,6 +826,16 @@ void ICommonStateGetter::SetCpuBoostMode(Kernel::HLERequestContext& ctx) {
826 apm_sys->SetCpuBoostMode(ctx); 826 apm_sys->SetCpuBoostMode(ctx);
827} 827}
828 828
829void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(Kernel::HLERequestContext& ctx) {
830 IPC::RequestParser rp{ctx};
831 const auto system_button{rp.PopEnum<SystemButtonType>()};
832
833 LOG_WARNING(Service_AM, "(STUBBED) called, system_button={}", system_button);
834
835 IPC::ResponseBuilder rb{ctx, 2};
836 rb.Push(ResultSuccess);
837}
838
829void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled( 839void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(
830 Kernel::HLERequestContext& ctx) { 840 Kernel::HLERequestContext& ctx) {
831 LOG_WARNING(Service_AM, "(STUBBED) called"); 841 LOG_WARNING(Service_AM, "(STUBBED) called");
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 06f13aa09..988ead215 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -220,6 +220,18 @@ private:
220 Docked = 1, 220 Docked = 1,
221 }; 221 };
222 222
223 // This is nn::am::service::SystemButtonType
224 enum class SystemButtonType {
225 None,
226 HomeButtonShortPressing,
227 HomeButtonLongPressing,
228 PowerButtonShortPressing,
229 PowerButtonLongPressing,
230 ShutdownSystem,
231 CaptureButtonShortPressing,
232 CaptureButtonLongPressing,
233 };
234
223 void GetEventHandle(Kernel::HLERequestContext& ctx); 235 void GetEventHandle(Kernel::HLERequestContext& ctx);
224 void ReceiveMessage(Kernel::HLERequestContext& ctx); 236 void ReceiveMessage(Kernel::HLERequestContext& ctx);
225 void GetCurrentFocusState(Kernel::HLERequestContext& ctx); 237 void GetCurrentFocusState(Kernel::HLERequestContext& ctx);
@@ -234,6 +246,7 @@ private:
234 void EndVrModeEx(Kernel::HLERequestContext& ctx); 246 void EndVrModeEx(Kernel::HLERequestContext& ctx);
235 void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx); 247 void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx);
236 void SetCpuBoostMode(Kernel::HLERequestContext& ctx); 248 void SetCpuBoostMode(Kernel::HLERequestContext& ctx);
249 void PerformSystemButtonPressingIfInFocus(Kernel::HLERequestContext& ctx);
237 void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(Kernel::HLERequestContext& ctx); 250 void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(Kernel::HLERequestContext& ctx);
238 251
239 std::shared_ptr<AppletMessageQueue> msg_queue; 252 std::shared_ptr<AppletMessageQueue> msg_queue;