diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-10-31 09:47:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-31 09:47:19 -0400 |
| commit | db5c24eb66ad0b889d68eea2fe76f15d980c4444 (patch) | |
| tree | db68207c4be04127a4c2a7ebcdedb6ca05c664ed /src/core/hle/service/am/am.cpp | |
| parent | c60204e2551ebf42ea7202992dac3789305d2a4e (diff) | |
| parent | f26dddf3b59ace84626dc05e2699514579d4a5bc (diff) | |
Merge pull request #11892 from german77/pkm_screenshot
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 ff067c8d9..242ea6665 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); |
