summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 9450de6e9..30cd73252 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1514,14 +1514,15 @@ void InstallInterfaces(SM::ServiceManager& service_manager,
1514 std::make_shared<TCAP>()->InstallAsService(service_manager); 1514 std::make_shared<TCAP>()->InstallAsService(service_manager);
1515} 1515}
1516 1516
1517IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions") { 1517IHomeMenuFunctions::IHomeMenuFunctions(Kernel::KernelCore& kernel)
1518 : ServiceFramework("IHomeMenuFunctions"), kernel(kernel) {
1518 // clang-format off 1519 // clang-format off
1519 static const FunctionInfo functions[] = { 1520 static const FunctionInfo functions[] = {
1520 {10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"}, 1521 {10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"},
1521 {11, nullptr, "LockForeground"}, 1522 {11, nullptr, "LockForeground"},
1522 {12, nullptr, "UnlockForeground"}, 1523 {12, nullptr, "UnlockForeground"},
1523 {20, nullptr, "PopFromGeneralChannel"}, 1524 {20, nullptr, "PopFromGeneralChannel"},
1524 {21, nullptr, "GetPopFromGeneralChannelEvent"}, 1525 {21, &IHomeMenuFunctions::GetPopFromGeneralChannelEvent, "GetPopFromGeneralChannelEvent"},
1525 {30, nullptr, "GetHomeButtonWriterLockAccessor"}, 1526 {30, nullptr, "GetHomeButtonWriterLockAccessor"},
1526 {31, nullptr, "GetWriterLockAccessorEx"}, 1527 {31, nullptr, "GetWriterLockAccessorEx"},
1527 {100, nullptr, "PopRequestLaunchApplicationForDebug"}, 1528 {100, nullptr, "PopRequestLaunchApplicationForDebug"},
@@ -1531,6 +1532,9 @@ IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions"
1531 // clang-format on 1532 // clang-format on
1532 1533
1533 RegisterHandlers(functions); 1534 RegisterHandlers(functions);
1535
1536 pop_from_general_channel_event = Kernel::WritableEvent::CreateEventPair(
1537 kernel, "IHomeMenuFunctions:PopFromGeneralChannelEvent");
1534} 1538}
1535 1539
1536IHomeMenuFunctions::~IHomeMenuFunctions() = default; 1540IHomeMenuFunctions::~IHomeMenuFunctions() = default;
@@ -1542,6 +1546,14 @@ void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx)
1542 rb.Push(RESULT_SUCCESS); 1546 rb.Push(RESULT_SUCCESS);
1543} 1547}
1544 1548
1549void IHomeMenuFunctions::GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx) {
1550 LOG_WARNING(Service_AM, "(STUBBED) called");
1551
1552 IPC::ResponseBuilder rb{ctx, 2, 1};
1553 rb.Push(RESULT_SUCCESS);
1554 rb.PushCopyObjects(pop_from_general_channel_event.readable);
1555}
1556
1545IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") { 1557IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") {
1546 // clang-format off 1558 // clang-format off
1547 static const FunctionInfo functions[] = { 1559 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) {