summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2019-07-11 13:32:20 -0400
committerGravatar Lioncash2019-07-11 13:34:55 -0400
commitf4ae449f733a0939a39d9674ddc152647b924027 (patch)
tree0f98a9600bb1545e9cdca1311bf0c3c03783edda /src
parentservice/am: Implement SetAutoSleepDisabled (diff)
downloadyuzu-f4ae449f733a0939a39d9674ddc152647b924027.tar.gz
yuzu-f4ae449f733a0939a39d9674ddc152647b924027.tar.xz
yuzu-f4ae449f733a0939a39d9674ddc152647b924027.zip
service/am: Implement IsAutoSleepDisabled
This simply queries whether or not auto-sleep facilities are disabled and has no special handling. It's a basic getter function.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/am.cpp10
-rw-r--r--src/core/hle/service/am/am.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 3f2f5c7db..a192a1f5f 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -267,7 +267,7 @@ ISelfController::ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger
267 {66, nullptr, "GetCurrentIlluminance"}, 267 {66, nullptr, "GetCurrentIlluminance"},
268 {67, nullptr, "IsIlluminanceAvailable"}, 268 {67, nullptr, "IsIlluminanceAvailable"},
269 {68, &ISelfController::SetAutoSleepDisabled, "SetAutoSleepDisabled"}, 269 {68, &ISelfController::SetAutoSleepDisabled, "SetAutoSleepDisabled"},
270 {69, nullptr, "IsAutoSleepDisabled"}, 270 {69, &ISelfController::IsAutoSleepDisabled, "IsAutoSleepDisabled"},
271 {70, nullptr, "ReportMultimediaError"}, 271 {70, nullptr, "ReportMultimediaError"},
272 {71, nullptr, "GetCurrentIlluminanceEx"}, 272 {71, nullptr, "GetCurrentIlluminanceEx"},
273 {80, nullptr, "SetWirelessPriorityMode"}, 273 {80, nullptr, "SetWirelessPriorityMode"},
@@ -474,6 +474,14 @@ void ISelfController::SetAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
474 rb.Push(RESULT_SUCCESS); 474 rb.Push(RESULT_SUCCESS);
475} 475}
476 476
477void ISelfController::IsAutoSleepDisabled(Kernel::HLERequestContext& ctx) {
478 LOG_DEBUG(Service_AM, "called.");
479
480 IPC::ResponseBuilder rb{ctx, 3};
481 rb.Push(RESULT_SUCCESS);
482 rb.Push(is_auto_sleep_disabled);
483}
484
477void ISelfController::GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx) { 485void ISelfController::GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx) {
478 LOG_DEBUG(Service_AM, "called."); 486 LOG_DEBUG(Service_AM, "called.");
479 487
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 0788e2dc0..6cb582483 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -134,6 +134,7 @@ private:
134 void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx); 134 void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
135 void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx); 135 void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
136 void SetAutoSleepDisabled(Kernel::HLERequestContext& ctx); 136 void SetAutoSleepDisabled(Kernel::HLERequestContext& ctx);
137 void IsAutoSleepDisabled(Kernel::HLERequestContext& ctx);
137 void GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx); 138 void GetAccumulatedSuspendedTickValue(Kernel::HLERequestContext& ctx);
138 void GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx); 139 void GetAccumulatedSuspendedTickChangedEvent(Kernel::HLERequestContext& ctx);
139 140