diff options
| author | 2020-05-04 16:20:11 -0400 | |
|---|---|---|
| committer | 2020-05-04 16:20:11 -0400 | |
| commit | 500e9c596939a959c2cdba8dd74d784fcf9ecac6 (patch) | |
| tree | 72eee9e499efde39c3e826fb651ef927e3a87b55 /src | |
| parent | Merge pull request #3637 from FearlessTobi/port-5094 (diff) | |
| parent | am: IHomeMenuFunctions:GetPopFromGeneralChannelEvent (diff) | |
| download | yuzu-500e9c596939a959c2cdba8dd74d784fcf9ecac6.tar.gz yuzu-500e9c596939a959c2cdba8dd74d784fcf9ecac6.tar.xz yuzu-500e9c596939a959c2cdba8dd74d784fcf9ecac6.zip | |
Merge pull request #3843 from ogniK5377/GetPopFromGeneralChannelEvent
am: IHomeMenuFunctions:GetPopFromGeneralChannelEvent
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 16 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 6 | ||||
| -rw-r--r-- | src/core/hle/service/am/applet_ae.cpp | 2 |
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 | ||
| 1528 | IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions") { | 1528 | IHomeMenuFunctions::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 | ||
| 1547 | IHomeMenuFunctions::~IHomeMenuFunctions() = default; | 1551 | IHomeMenuFunctions::~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 | ||
| 1560 | void 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 | |||
| 1556 | IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") { | 1568 | IGlobalStateController::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 | ||
| 293 | class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> { | 293 | class IHomeMenuFunctions final : public ServiceFramework<IHomeMenuFunctions> { |
| 294 | public: | 294 | public: |
| 295 | IHomeMenuFunctions(); | 295 | explicit IHomeMenuFunctions(Kernel::KernelCore& kernel); |
| 296 | ~IHomeMenuFunctions() override; | 296 | ~IHomeMenuFunctions() override; |
| 297 | 297 | ||
| 298 | private: | 298 | private: |
| 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 | ||
| 302 | class IGlobalStateController final : public ServiceFramework<IGlobalStateController> { | 306 | class 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) { |