summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/am.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-07-11 19:02:29 +0200
committerLioncash <mathew1800@gmail.com>2019-07-11 19:09:03 +0200
commitb81f6f67f50f5fd5416ca5b54f1e32536c7ece7d (patch)
tree913fec5c332f6baac3a1d831724727117a77f90f /src/core/hle/service/am/am.cpp
parentMerge pull request #2714 from DarkLordZach/repo-sync-pipeline (diff)
downloadyuzu-b81f6f67f50f5fd5416ca5b54f1e32536c7ece7d.tar
yuzu-b81f6f67f50f5fd5416ca5b54f1e32536c7ece7d.tar.gz
yuzu-b81f6f67f50f5fd5416ca5b54f1e32536c7ece7d.tar.bz2
yuzu-b81f6f67f50f5fd5416ca5b54f1e32536c7ece7d.tar.lz
yuzu-b81f6f67f50f5fd5416ca5b54f1e32536c7ece7d.tar.xz
yuzu-b81f6f67f50f5fd5416ca5b54f1e32536c7ece7d.tar.zst
yuzu-b81f6f67f50f5fd5416ca5b54f1e32536c7ece7d.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/am/am.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 9fdcf2965..3f2f5c7db 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -266,7 +266,7 @@ ISelfController::ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger
{65, nullptr, "ReportUserIsActive"},
{66, nullptr, "GetCurrentIlluminance"},
{67, nullptr, "IsIlluminanceAvailable"},
- {68, nullptr, "SetAutoSleepDisabled"},
+ {68, &ISelfController::SetAutoSleepDisabled, "SetAutoSleepDisabled"},
{69, nullptr, "IsAutoSleepDisabled"},
{70, nullptr, "ReportMultimediaError"},
{71, nullptr, "GetCurrentIlluminanceEx"},
@@ -454,6 +454,26 @@ void ISelfController::GetIdleTimeDetectionExtension(Kernel::HLERequestContext& c
rb.Push<u32>(idle_time_detection_extension);
}
+void ISelfController::SetAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ is_auto_sleep_disabled = rp.Pop<bool>();
+
+ // On the system itself, if the previous state of is_auto_sleep_disabled
+ // differed from the current value passed in, it'd signify the internal
+ // window manager to update (and also increment some statistics like update counts)
+ //
+ // It'd also indicate this change to an idle handling context.
+ //
+ // However, given we're emulating this behavior, most of this can be ignored
+ // and it's sufficient to simply set the member variable for querying via
+ // IsAutoSleepDisabled().
+
+ LOG_DEBUG(Service_AM, "called. is_auto_sleep_disabled={}", is_auto_sleep_disabled);
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+}
+
void ISelfController::GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_AM, "called.");