summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/apt/apt.cpp
diff options
context:
space:
mode:
authorJamePeng <jame_peng@sina.com>2016-07-14 12:26:43 +0200
committerJamePeng <jame_peng@sina.com>2016-07-15 13:47:01 +0200
commitd5aa47478895386a59f59a650d7391e3598e6739 (patch)
tree6ace3faba9e2e50cea388efdd8cda057e2a2907f /src/core/hle/service/apt/apt.cpp
parentMerge pull request #1890 from LFsWang/fix-encode-problem (diff)
downloadyuzu-d5aa47478895386a59f59a650d7391e3598e6739.tar
yuzu-d5aa47478895386a59f59a650d7391e3598e6739.tar.gz
yuzu-d5aa47478895386a59f59a650d7391e3598e6739.tar.bz2
yuzu-d5aa47478895386a59f59a650d7391e3598e6739.tar.lz
yuzu-d5aa47478895386a59f59a650d7391e3598e6739.tar.xz
yuzu-d5aa47478895386a59f59a650d7391e3598e6739.tar.zst
yuzu-d5aa47478895386a59f59a650d7391e3598e6739.zip
Diffstat (limited to 'src/core/hle/service/apt/apt.cpp')
-rw-r--r--src/core/hle/service/apt/apt.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index 1e54a53dd..14d661b38 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -37,6 +37,8 @@ static u32 cpu_percent; ///< CPU time available to the running application
// APT::CheckNew3DSApp will check this unknown_ns_state_field to determine processing mode
static u8 unknown_ns_state_field;
+static ScreencapPostPermission screen_capture_post_permission;
+
/// Parameter data to be returned in the next call to Glance/ReceiveParameter
static MessageParameter next_parameter;
@@ -382,23 +384,23 @@ void StartLibraryApplet(Service::Interface* self) {
cmd_buff[1] = applet->Start(parameter).raw;
}
-void SetNSStateField(Service::Interface* self) {
+void SetScreenCapPostPermission(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
- unknown_ns_state_field = cmd_buff[1];
+ screen_capture_post_permission = static_cast<ScreencapPostPermission>(cmd_buff[1] & 0xF);
cmd_buff[0] = IPC::MakeHeader(0x55, 1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
- LOG_WARNING(Service_APT, "(STUBBED) unknown_ns_state_field=%u", unknown_ns_state_field);
+ LOG_WARNING(Service_APT, "(STUBBED) screen_capture_post_permission=%u", screen_capture_post_permission);
}
-void GetNSStateField(Service::Interface* self) {
+void GetScreenCapPostPermission(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[0] = IPC::MakeHeader(0x56, 2, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
- cmd_buff[8] = unknown_ns_state_field;
- LOG_WARNING(Service_APT, "(STUBBED) unknown_ns_state_field=%u", unknown_ns_state_field);
+ cmd_buff[2] = static_cast<u32>(screen_capture_post_permission);
+ LOG_WARNING(Service_APT, "(STUBBED) screen_capture_post_permission=%u", screen_capture_post_permission);
}
void GetAppletInfo(Service::Interface* self) {
@@ -493,6 +495,7 @@ void Init() {
cpu_percent = 0;
unknown_ns_state_field = 0;
+ screen_capture_post_permission = ScreencapPostPermission::CleanThePermission; // TODO(JamePeng): verify the initial value
// TODO(bunnei): Check if these are created in Initialize or on APT process startup.
notification_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Notification");