diff options
| author | 2018-06-04 13:23:19 -0400 | |
|---|---|---|
| committer | 2018-06-04 13:23:19 -0400 | |
| commit | b7c64f0dedb871ff7202763602c29e68082d7ee9 (patch) | |
| tree | 5e0bf442859482988f6b7ac23e284b119512c010 /src | |
| parent | Merge pull request #507 from valentinvanelslande/3616 (diff) | |
| parent | am: Implement ILibraryAppletAccessor::PopOutData. (diff) | |
| download | yuzu-b7c64f0dedb871ff7202763602c29e68082d7ee9.tar.gz yuzu-b7c64f0dedb871ff7202763602c29e68082d7ee9.tar.xz yuzu-b7c64f0dedb871ff7202763602c29e68082d7ee9.zip | |
Merge pull request #502 from bunnei/more-am-stuff
am: Implement PopOutData, and various fixes.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 40922ec3a..12954556d 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -155,7 +155,7 @@ ISelfController::ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger | |||
| 155 | RegisterHandlers(functions); | 155 | RegisterHandlers(functions); |
| 156 | 156 | ||
| 157 | launchable_event = | 157 | launchable_event = |
| 158 | Kernel::Event::Create(Kernel::ResetType::OneShot, "ISelfController:LaunchableEvent"); | 158 | Kernel::Event::Create(Kernel::ResetType::Sticky, "ISelfController:LaunchableEvent"); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) { | 161 | void ISelfController::SetFocusHandlingMode(Kernel::HLERequestContext& ctx) { |
| @@ -436,13 +436,13 @@ public: | |||
| 436 | static const FunctionInfo functions[] = { | 436 | static const FunctionInfo functions[] = { |
| 437 | {0, &ILibraryAppletAccessor::GetAppletStateChangedEvent, "GetAppletStateChangedEvent"}, | 437 | {0, &ILibraryAppletAccessor::GetAppletStateChangedEvent, "GetAppletStateChangedEvent"}, |
| 438 | {1, nullptr, "IsCompleted"}, | 438 | {1, nullptr, "IsCompleted"}, |
| 439 | {10, nullptr, "Start"}, | 439 | {10, &ILibraryAppletAccessor::Start, "Start"}, |
| 440 | {20, nullptr, "RequestExit"}, | 440 | {20, nullptr, "RequestExit"}, |
| 441 | {25, nullptr, "Terminate"}, | 441 | {25, nullptr, "Terminate"}, |
| 442 | {30, nullptr, "GetResult"}, | 442 | {30, &ILibraryAppletAccessor::GetResult, "GetResult"}, |
| 443 | {50, nullptr, "SetOutOfFocusApplicationSuspendingEnabled"}, | 443 | {50, nullptr, "SetOutOfFocusApplicationSuspendingEnabled"}, |
| 444 | {100, &ILibraryAppletAccessor::PushInData, "PushInData"}, | 444 | {100, &ILibraryAppletAccessor::PushInData, "PushInData"}, |
| 445 | {101, nullptr, "PopOutData"}, | 445 | {101, &ILibraryAppletAccessor::PopOutData, "PopOutData"}, |
| 446 | {102, nullptr, "PushExtraStorage"}, | 446 | {102, nullptr, "PushExtraStorage"}, |
| 447 | {103, nullptr, "PushInteractiveInData"}, | 447 | {103, nullptr, "PushInteractiveInData"}, |
| 448 | {104, nullptr, "PopInteractiveOutData"}, | 448 | {104, nullptr, "PopInteractiveOutData"}, |
| @@ -470,6 +470,20 @@ private: | |||
| 470 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | 470 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); |
| 471 | } | 471 | } |
| 472 | 472 | ||
| 473 | void GetResult(Kernel::HLERequestContext& ctx) { | ||
| 474 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 475 | rb.Push(RESULT_SUCCESS); | ||
| 476 | |||
| 477 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 478 | } | ||
| 479 | |||
| 480 | void Start(Kernel::HLERequestContext& ctx) { | ||
| 481 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 482 | rb.Push(RESULT_SUCCESS); | ||
| 483 | |||
| 484 | NGLOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 485 | } | ||
| 486 | |||
| 473 | void PushInData(Kernel::HLERequestContext& ctx) { | 487 | void PushInData(Kernel::HLERequestContext& ctx) { |
| 474 | IPC::RequestParser rp{ctx}; | 488 | IPC::RequestParser rp{ctx}; |
| 475 | storage_stack.push(rp.PopIpcInterface<AM::IStorage>()); | 489 | storage_stack.push(rp.PopIpcInterface<AM::IStorage>()); |
| @@ -480,6 +494,16 @@ private: | |||
| 480 | NGLOG_DEBUG(Service_AM, "called"); | 494 | NGLOG_DEBUG(Service_AM, "called"); |
| 481 | } | 495 | } |
| 482 | 496 | ||
| 497 | void PopOutData(Kernel::HLERequestContext& ctx) { | ||
| 498 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 499 | rb.Push(RESULT_SUCCESS); | ||
| 500 | rb.PushIpcInterface<AM::IStorage>(std::move(storage_stack.top())); | ||
| 501 | |||
| 502 | storage_stack.pop(); | ||
| 503 | |||
| 504 | NGLOG_DEBUG(Service_AM, "called"); | ||
| 505 | } | ||
| 506 | |||
| 483 | std::stack<std::shared_ptr<AM::IStorage>> storage_stack; | 507 | std::stack<std::shared_ptr<AM::IStorage>> storage_stack; |
| 484 | Kernel::SharedPtr<Kernel::Event> state_changed_event; | 508 | Kernel::SharedPtr<Kernel::Event> state_changed_event; |
| 485 | }; | 509 | }; |