summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/apt/apt.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-07-29 02:50:49 +0200
committerGitHub <noreply@github.com>2016-07-29 02:50:49 +0200
commit47fcd68b01a12143efa92ffa54bc9611fc376fd2 (patch)
tree92d57d519cc683f94902895149ad84c6df3cfd35 /src/core/hle/service/apt/apt.cpp
parentMerge pull request #1983 from hrydgard/font-reminder (diff)
parentCorrect APT::0x00550040 and APT::0x00560000 function (diff)
downloadyuzu-47fcd68b01a12143efa92ffa54bc9611fc376fd2.tar
yuzu-47fcd68b01a12143efa92ffa54bc9611fc376fd2.tar.gz
yuzu-47fcd68b01a12143efa92ffa54bc9611fc376fd2.tar.bz2
yuzu-47fcd68b01a12143efa92ffa54bc9611fc376fd2.tar.lz
yuzu-47fcd68b01a12143efa92ffa54bc9611fc376fd2.tar.xz
yuzu-47fcd68b01a12143efa92ffa54bc9611fc376fd2.tar.zst
yuzu-47fcd68b01a12143efa92ffa54bc9611fc376fd2.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 0c623d45f..c009e6c98 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;
@@ -389,23 +391,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) {
@@ -500,6 +502,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");