summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar greggameplayer2018-08-17 06:23:08 +0200
committerGravatar bunnei2018-08-17 00:23:08 -0400
commit20037717898de9b3b03941d8361bbc6896cd0a35 (patch)
tree5917f595c330959619e032fa177703f57a38d58e /src
parentMerge pull request #1090 from lioncash/ctor-assign (diff)
downloadyuzu-20037717898de9b3b03941d8361bbc6896cd0a35.tar.gz
yuzu-20037717898de9b3b03941d8361bbc6896cd0a35.tar.xz
yuzu-20037717898de9b3b03941d8361bbc6896cd0a35.zip
Implement SetIdleTimeDetectionExtension & GetIdleTimeDetectionExtension (#1059)
* Used by Mario Tennis Aces
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/am.cpp21
-rw-r--r--src/core/hle/service/am/am.h3
2 files changed, 22 insertions, 2 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 966602b31..c524e7a48 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -145,8 +145,8 @@ ISelfController::ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger
145 {51, nullptr, "ApproveToDisplay"}, 145 {51, nullptr, "ApproveToDisplay"},
146 {60, nullptr, "OverrideAutoSleepTimeAndDimmingTime"}, 146 {60, nullptr, "OverrideAutoSleepTimeAndDimmingTime"},
147 {61, nullptr, "SetMediaPlaybackState"}, 147 {61, nullptr, "SetMediaPlaybackState"},
148 {62, nullptr, "SetIdleTimeDetectionExtension"}, 148 {62, &ISelfController::SetIdleTimeDetectionExtension, "SetIdleTimeDetectionExtension"},
149 {63, nullptr, "GetIdleTimeDetectionExtension"}, 149 {63, &ISelfController::GetIdleTimeDetectionExtension, "GetIdleTimeDetectionExtension"},
150 {64, nullptr, "SetInputDetectionSourceSet"}, 150 {64, nullptr, "SetInputDetectionSourceSet"},
151 {65, nullptr, "ReportUserIsActive"}, 151 {65, nullptr, "ReportUserIsActive"},
152 {66, nullptr, "GetCurrentIlluminance"}, 152 {66, nullptr, "GetCurrentIlluminance"},
@@ -281,6 +281,23 @@ void ISelfController::SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx)
281 LOG_WARNING(Service_AM, "(STUBBED) called"); 281 LOG_WARNING(Service_AM, "(STUBBED) called");
282} 282}
283 283
284void ISelfController::SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) {
285 IPC::RequestParser rp{ctx};
286 idle_time_detection_extension = rp.Pop<u32>();
287 IPC::ResponseBuilder rb{ctx, 2};
288 rb.Push(RESULT_SUCCESS);
289
290 LOG_WARNING(Service_AM, "(STUBBED) called");
291}
292
293void ISelfController::GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx) {
294 IPC::ResponseBuilder rb{ctx, 3};
295 rb.Push(RESULT_SUCCESS);
296 rb.Push<u32>(idle_time_detection_extension);
297
298 LOG_WARNING(Service_AM, "(STUBBED) called");
299}
300
284ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter") { 301ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter") {
285 static const FunctionInfo functions[] = { 302 static const FunctionInfo functions[] = {
286 {0, &ICommonStateGetter::GetEventHandle, "GetEventHandle"}, 303 {0, &ICommonStateGetter::GetEventHandle, "GetEventHandle"},
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 5de1857d8..b763aff6f 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -87,9 +87,12 @@ private:
87 void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx); 87 void CreateManagedDisplayLayer(Kernel::HLERequestContext& ctx);
88 void SetScreenShotPermission(Kernel::HLERequestContext& ctx); 88 void SetScreenShotPermission(Kernel::HLERequestContext& ctx);
89 void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx); 89 void SetHandlesRequestToDisplay(Kernel::HLERequestContext& ctx);
90 void SetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
91 void GetIdleTimeDetectionExtension(Kernel::HLERequestContext& ctx);
90 92
91 std::shared_ptr<NVFlinger::NVFlinger> nvflinger; 93 std::shared_ptr<NVFlinger::NVFlinger> nvflinger;
92 Kernel::SharedPtr<Kernel::Event> launchable_event; 94 Kernel::SharedPtr<Kernel::Event> launchable_event;
95 u32 idle_time_detection_extension = 0;
93}; 96};
94 97
95class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> { 98class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> {