summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-08-07 15:34:20 +0200
committerGitHub <noreply@github.com>2020-08-07 15:34:20 +0200
commit929fc849e9498215f8a35eb0700acccb1ccbbee3 (patch)
tree33d333634c1bb522607c33fbe0724cfa51a1eedb
parentMerge pull request #4389 from ogniK5377/redundant-format-type (diff)
parentam: Unstub SetScreenShotPermission (diff)
downloadyuzu-929fc849e9498215f8a35eb0700acccb1ccbbee3.tar
yuzu-929fc849e9498215f8a35eb0700acccb1ccbbee3.tar.gz
yuzu-929fc849e9498215f8a35eb0700acccb1ccbbee3.tar.bz2
yuzu-929fc849e9498215f8a35eb0700acccb1ccbbee3.tar.lz
yuzu-929fc849e9498215f8a35eb0700acccb1ccbbee3.tar.xz
yuzu-929fc849e9498215f8a35eb0700acccb1ccbbee3.tar.zst
yuzu-929fc849e9498215f8a35eb0700acccb1ccbbee3.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/am/am.cpp6
-rw-r--r--src/core/hle/service/am/am.h7
2 files changed, 12 insertions, 1 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 55a1edf1a..7d92b25a3 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -378,7 +378,11 @@ void ISelfController::GetLibraryAppletLaunchableEvent(Kernel::HLERequestContext&
}
void ISelfController::SetScreenShotPermission(Kernel::HLERequestContext& ctx) {
- LOG_WARNING(Service_AM, "(STUBBED) called");
+ IPC::RequestParser rp{ctx};
+ const auto permission = rp.PopEnum<ScreenshotPermission>();
+ LOG_DEBUG(Service_AM, "called, permission={}", permission);
+
+ screenshot_permission = permission;
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 6cfb11b48..6e69796ec 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -149,6 +149,12 @@ private:
void GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx);
void GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx);
+ enum class ScreenshotPermission : u32 {
+ Inherit = 0,
+ Enable = 1,
+ Disable = 2,
+ };
+
Core::System& system;
std::shared_ptr<NVFlinger::NVFlinger> nvflinger;
Kernel::EventPair launchable_event;
@@ -157,6 +163,7 @@ private:
u32 idle_time_detection_extension = 0;
u64 num_fatal_sections_entered = 0;
bool is_auto_sleep_disabled = false;
+ ScreenshotPermission screenshot_permission = ScreenshotPermission::Inherit;
};
class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> {