diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-10-27 00:27:44 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-10-27 06:29:52 +0200 |
commit | f26dddf3b59ace84626dc05e2699514579d4a5bc (patch) | |
tree | 6521620938a6f644ae848b4ed632cf3f8c3c192c /src/core/hle/service/am | |
parent | Merge pull request #11880 from abouvier/unbundle-stb (diff) | |
download | yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.gz yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.bz2 yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.lz yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.xz yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.tar.zst yuzu-f26dddf3b59ace84626dc05e2699514579d4a5bc.zip |
Diffstat (limited to 'src/core/hle/service/am')
-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 98765b81a..0886531b2 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); |