From 720cfaafb610f5453d9db38e2084fd810db570b3 Mon Sep 17 00:00:00 2001 From: Dima Date: Fri, 4 Nov 2022 15:18:40 +0300 Subject: [PATCH] Stub caps:su --- app/CMakeLists.txt | 1 + .../capsrv/IScreenShotApplicationService.cpp | 8 ++++++++ .../capsrv/IScreenShotApplicationService.h | 17 +++++++++++++++++ .../main/cpp/skyline/services/serviceman.cpp | 2 ++ 4 files changed, 28 insertions(+) create mode 100644 app/src/main/cpp/skyline/services/capsrv/IScreenShotApplicationService.cpp create mode 100644 app/src/main/cpp/skyline/services/capsrv/IScreenShotApplicationService.h diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 9da4a481..20055e69 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -291,6 +291,7 @@ add_library(skyline SHARED ${source_DIR}/skyline/services/capsrv/IAlbumAccessorService.cpp ${source_DIR}/skyline/services/capsrv/ICaptureControllerService.cpp ${source_DIR}/skyline/services/capsrv/IAlbumApplicationService.cpp + ${source_DIR}/skyline/services/capsrv/IScreenShotApplicationService.cpp ${source_DIR}/skyline/services/ro/IRoInterface.cpp ${source_DIR}/skyline/applet/applet_creator.cpp ${source_DIR}/skyline/applet/controller_applet.cpp diff --git a/app/src/main/cpp/skyline/services/capsrv/IScreenShotApplicationService.cpp b/app/src/main/cpp/skyline/services/capsrv/IScreenShotApplicationService.cpp new file mode 100644 index 00000000..2959768b --- /dev/null +++ b/app/src/main/cpp/skyline/services/capsrv/IScreenShotApplicationService.cpp @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/) + +#include "IScreenShotApplicationService.h" + +namespace skyline::service::capsrv { + IScreenShotApplicationService::IScreenShotApplicationService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {} +} \ No newline at end of file diff --git a/app/src/main/cpp/skyline/services/capsrv/IScreenShotApplicationService.h b/app/src/main/cpp/skyline/services/capsrv/IScreenShotApplicationService.h new file mode 100644 index 00000000..52990bed --- /dev/null +++ b/app/src/main/cpp/skyline/services/capsrv/IScreenShotApplicationService.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/) + +#pragma once + +#include + +namespace skyline::service::capsrv { + /** + * @brief Used by applications to save screenshots + * @url https://switchbrew.org/wiki/Applet_Manager_services#caps:su + */ + class IScreenShotApplicationService : public BaseService { + public: + IScreenShotApplicationService(const DeviceState &state, ServiceManager &manager); + }; +} \ No newline at end of file diff --git a/app/src/main/cpp/skyline/services/serviceman.cpp b/app/src/main/cpp/skyline/services/serviceman.cpp index 969385fc..d9ca856e 100644 --- a/app/src/main/cpp/skyline/services/serviceman.cpp +++ b/app/src/main/cpp/skyline/services/serviceman.cpp @@ -52,6 +52,7 @@ #include "capsrv/IAlbumAccessorService.h" #include "capsrv/ICaptureControllerService.h" #include "capsrv/IAlbumApplicationService.h" +#include "capsrv/IScreenShotApplicationService.h" #include "ro/IRoInterface.h" #include "serviceman.h" @@ -132,6 +133,7 @@ namespace skyline::service { SERVICE_CASE(capsrv::IAlbumAccessorService, "caps:a") SERVICE_CASE(capsrv::ICaptureControllerService, "caps:c") SERVICE_CASE(capsrv::IAlbumApplicationService, "caps:u") + SERVICE_CASE(capsrv::IScreenShotApplicationService, "caps:su") SERVICE_CASE(nim::IShopServiceAccessServerInterface, "nim:eca") SERVICE_CASE(ro::IRoInterface, "ldr:ro") default: