summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/am/am.cpp16
-rw-r--r--src/core/hle/service/am/am.h6
-rw-r--r--src/core/hle/service/am/applet_ae.cpp2
3 files changed, 20 insertions, 4 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index a967e6ef7..4df74c4f9 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1525,14 +1525,15 @@ void InstallInterfaces(SM::ServiceManager& service_manager,
1525 std::make_shared<TCAP>()->InstallAsService(service_manager); 1525 std::make_shared<TCAP>()->InstallAsService(service_manager);
1526} 1526}
1527 1527
1528IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions") { 1528IHomeMenuFunctions::IHomeMenuFunctions(Kernel::KernelCore& kernel)
1529 : ServiceFramework("IHomeMenuFunctions"), kernel(kernel) {
1529 // clang-format off 1530 // clang-format off
1530 static const FunctionInfo functions[] = { 1531 static const FunctionInfo functions[] = {
1531 {10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"}, 1532 {10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"},
1532 {11, nullptr, "LockForeground"}, 1533 {11, nullptr, "LockForeground"},
1533 {12, nullptr, "UnlockForeground"}, 1534 {12, nullptr, "UnlockForeground"},
1534 {20, nullptr, "PopFromGeneralChannel"}, 1535 {20, nullptr, "PopFromGeneralChannel"},
1535 {21, nullptr, "GetPopFromGeneralChannelEvent"}, 1536 {21, &IHomeMenuFunctions::GetPopFromGeneralChannelEvent, "GetPopFromGeneralChannelEvent"},
1536 {30, nullptr, "GetHomeButtonWriterLockAccessor"}, 1537 {30, nullptr, "GetHomeButtonWriterLockAccessor"},
1537 {31, nullptr, "GetWriterLockAccessorEx"}, 1538 {31, nullptr, "GetWriterLockAccessorEx"},
1538 {100, nullptr, "PopRequestLaunchApplicationForDebug"}, 1539 {100, nullptr, "PopRequestLaunchApplicationForDebug"},
@@ -1542,6 +1543,9 @@ IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions"
1542 // clang-format on 1543 // clang-format on
1543 1544
1544 RegisterHandlers(functions); 1545 RegisterHandlers(functions);
1546
1547 pop_from_general_channel_event = Kernel::WritableEvent::CreateEventPair(
1548 kernel, "IHomeMenuFunctions:PopFromGeneralChannelEvent");
1545} 1549}
1546 1550
1547IHomeMenuFunctions::~IHomeMenuFunctions() = default; 1551IHomeMenuFunctions::~IHomeMenuFunctions() = default;
@@ -1553,6 +1557,14 @@ void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx)
1553 rb.Push(RESULT_SUCCESS); 1557 rb.Push(RESULT_SUCCESS);
1554} 1558}
1555 1559
1560void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx) {
1561 LOG_WARNING(Service_AM, "(STUBBED) called");
1562
1563 IPC::ResponseBuilder rb{ctx, 2, 1};
1564 rb.Push(RESULT_SUCCESS);
1565 rb.PushCopyObjects(pop_from_general_channel_event.readable);
1566}
1567
1556IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") { 1568IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") {
1557 // clang-format off 1569 // clang-format off
1558 static const FunctionInfo functions[] = { 1570 static const FunctionInfo functions[] = {
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index dfa701d73..469f7f814 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -292,11 +292,15 @@ private:
292 292
293class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> { 293class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> {
294public: 294public:
295 IHomeMenuFunctions(); 295 explicit IHomeMenuFunctions(Kernel::KernelCore& kernel);
296 ~IHomeMenuFunctions() override; 296 ~IHomeMenuFunctions() override;
297 297
298private: 298private:
299 void RequestToGetForeground(Kernel::HLERequestContext& ctx); 299 void RequestToGetForeground(Kernel::HLERequestContext& ctx);
300 void GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx);
301
302 Kernel::EventPair pop_from_general_channel_event;
303 Kernel::KernelCore& kernel;
300}; 304};
301 305
302class IGlobalStateController final : public ServiceFramework<IGlobalStateController> { 306class IGlobalStateController final : public ServiceFramework<IGlobalStateController> {
diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp
index e454b77d8..9df286d17 100644
--- a/src/core/hle/service/am/applet_ae.cpp
+++ b/src/core/hle/service/am/applet_ae.cpp
@@ -202,7 +202,7 @@ private:
202 202
203 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 203 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
204 rb.Push(RESULT_SUCCESS); 204 rb.Push(RESULT_SUCCESS);
205 rb.PushIpcInterface<IHomeMenuFunctions>(); 205 rb.PushIpcInterface<IHomeMenuFunctions>(system.Kernel());
206 } 206 }
207 207
208 void GetGlobalStateController(Kernel::HLERequestContext& ctx) { 208 void GetGlobalStateController(Kernel::HLERequestContext& ctx) {