summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-31 14:47:19 +0100
committerGitHub <noreply@github.com>2023-10-31 14:47:19 +0100
commitdb5c24eb66ad0b889d68eea2fe76f15d980c4444 (patch)
treedb68207c4be04127a4c2a7ebcdedb6ca05c664ed /src/core/hle/service/am
parentMerge pull request #11922 from t895/simplify-card-layout (diff)
parentservice: am: Implement ISelfController::SaveCurrentScreenshot (diff)
downloadyuzu-db5c24eb66ad0b889d68eea2fe76f15d980c4444.tar
yuzu-db5c24eb66ad0b889d68eea2fe76f15d980c4444.tar.gz
yuzu-db5c24eb66ad0b889d68eea2fe76f15d980c4444.tar.bz2
yuzu-db5c24eb66ad0b889d68eea2fe76f15d980c4444.tar.lz
yuzu-db5c24eb66ad0b889d68eea2fe76f15d980c4444.tar.xz
yuzu-db5c24eb66ad0b889d68eea2fe76f15d980c4444.tar.zst
yuzu-db5c24eb66ad0b889d68eea2fe76f15d980c4444.zip
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r--src/core/hle/service/am/am.cpp13
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);