diff options
| author | Narr the Reg <juangerman-13@hotmail.com> | 2023-10-26 16:27:44 -0600 |
|---|---|---|
| committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-10-26 22:29:52 -0600 |
| commit | 44e75debd3d6d36bd2cdcddd09d7b156cc099271 (patch) | |
| tree | 6521620938a6f644ae848b4ed632cf3f8c3c192c /src/core/hle/service/am/am.cpp | |
| parent | 99b8976a5fa1cdf5a67b99b00c768b7b2fe3a274 (diff) | |
service: am: Implement ISelfController::SaveCurrentScreenshot
Diffstat (limited to 'src/core/hle/service/am/am.cpp')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 98765b81ae..0886531b28 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -31,6 +31,7 @@ #include "core/hle/service/apm/apm_controller.h" #include "core/hle/service/apm/apm_interface.h" #include "core/hle/service/bcat/backend/backend.h" +#include "core/hle/service/caps/caps_su.h" #include "core/hle/service/caps/caps_types.h" #include "core/hle/service/filesystem/filesystem.h" #include "core/hle/service/ipc_helpers.h" @@ -702,9 +703,17 @@ void ISelfController::SetAlbumImageTakenNotificationEnabled(HLERequestContext& c void ISelfController::SaveCurrentScreenshot(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; - const auto album_report_option = rp.PopEnum<Capture::AlbumReportOption>(); + const auto report_option = rp.PopEnum<Capture::AlbumReportOption>(); - LOG_WARNING(Service_AM, "(STUBBED) called. album_report_option={}", album_report_option); + LOG_INFO(Service_AM, "called, report_option={}", report_option); + + const auto screenshot_service = + system.ServiceManager().GetService<Service::Capture::IScreenShotApplicationService>( + "caps:su"); + + if (screenshot_service) { + screenshot_service->CaptureAndSaveScreenshot(report_option); + } IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); |
