diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index a872bea0c..b78489df7 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -548,6 +548,9 @@ public: | |||
| 548 | auto& kernel = Core::System::GetInstance().Kernel(); | 548 | auto& kernel = Core::System::GetInstance().Kernel(); |
| 549 | state_changed_event = Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, | 549 | state_changed_event = Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, |
| 550 | "ILibraryAppletAccessor:StateChangedEvent"); | 550 | "ILibraryAppletAccessor:StateChangedEvent"); |
| 551 | pop_interactive_out_data_event = | ||
| 552 | Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, | ||
| 553 | "ILibraryAppletAccessor:PopInteractiveDataOutEvent"); | ||
| 551 | } | 554 | } |
| 552 | 555 | ||
| 553 | private: | 556 | private: |
| @@ -596,27 +599,34 @@ private: | |||
| 596 | LOG_DEBUG(Service_AM, "called"); | 599 | LOG_DEBUG(Service_AM, "called"); |
| 597 | } | 600 | } |
| 598 | 601 | ||
| 599 | ctx.WriteBuffer(buffer.data() + offset, size); | 602 | void PushInteractiveInData(Kernel::HLERequestContext& ctx) { |
| 603 | IPC::RequestParser rp{ctx}; | ||
| 604 | interactive_storage_stack.push_back(rp.PopIpcInterface<IStorage>()); | ||
| 600 | 605 | ||
| 601 | IPC::ResponseBuilder rb{ctx, 2}; | 606 | IPC::ResponseBuilder rb{ctx, 2}; |
| 602 | rb.Push(RESULT_SUCCESS); | 607 | rb.Push(RESULT_SUCCESS); |
| 603 | 608 | ||
| 604 | LOG_DEBUG(Service_AM, "called, offset={}", offset); | 609 | LOG_DEBUG(Service_AM, "called"); |
| 605 | } | 610 | } |
| 606 | }; | ||
| 607 | 611 | ||
| 608 | class IStorage final : public ServiceFramework<IStorage> { | 612 | void PopInteractiveOutData(Kernel::HLERequestContext& ctx) { |
| 609 | public: | 613 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 610 | explicit IStorage(std::vector<u8> buffer) | 614 | rb.Push(RESULT_SUCCESS); |
| 611 | : ServiceFramework("IStorage"), buffer(std::move(buffer)) { | 615 | rb.PushIpcInterface<IStorage>(std::move(interactive_storage_stack.back())); |
| 612 | // clang-format off | ||
| 613 | static const FunctionInfo functions[] = { | ||
| 614 | {0, &IStorage::Open, "Open"}, | ||
| 615 | {1, nullptr, "OpenTransferStorage"}, | ||
| 616 | }; | ||
| 617 | // clang-format on | ||
| 618 | 616 | ||
| 619 | RegisterHandlers(functions); | 617 | interactive_storage_stack.pop_back(); |
| 618 | |||
| 619 | LOG_DEBUG(Service_AM, "called"); | ||
| 620 | } | ||
| 621 | |||
| 622 | void GetPopInteractiveOutDataEvent(Kernel::HLERequestContext& ctx) { | ||
| 623 | pop_interactive_out_data_event->Signal(); | ||
| 624 | |||
| 625 | IPC::ResponseBuilder rb{ctx, 2, 1}; | ||
| 626 | rb.Push(RESULT_SUCCESS); | ||
| 627 | rb.PushCopyObjects(pop_interactive_out_data_event); | ||
| 628 | |||
| 629 | LOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 620 | } | 630 | } |
| 621 | 631 | ||
| 622 | std::shared_ptr<Applets::Applet> applet; | 632 | std::shared_ptr<Applets::Applet> applet; |