diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/am/self_controller.cpp | 15 | ||||
| -rw-r--r-- | src/core/hle/service/am/self_controller.h | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/core/hle/service/am/self_controller.cpp b/src/core/hle/service/am/self_controller.cpp index b92663b2b..65e249c0c 100644 --- a/src/core/hle/service/am/self_controller.cpp +++ b/src/core/hle/service/am/self_controller.cpp | |||
| @@ -1,10 +1,13 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include "common/logging/log.h" | ||
| 5 | #include "core/hle/result.h" | ||
| 4 | #include "core/hle/service/am/am_results.h" | 6 | #include "core/hle/service/am/am_results.h" |
| 5 | #include "core/hle/service/am/frontend/applets.h" | 7 | #include "core/hle/service/am/frontend/applets.h" |
| 6 | #include "core/hle/service/am/self_controller.h" | 8 | #include "core/hle/service/am/self_controller.h" |
| 7 | #include "core/hle/service/caps/caps_su.h" | 9 | #include "core/hle/service/caps/caps_su.h" |
| 10 | #include "core/hle/service/hle_ipc.h" | ||
| 8 | #include "core/hle/service/ipc_helpers.h" | 11 | #include "core/hle/service/ipc_helpers.h" |
| 9 | #include "core/hle/service/nvnflinger/fb_share_buffer_manager.h" | 12 | #include "core/hle/service/nvnflinger/fb_share_buffer_manager.h" |
| 10 | #include "core/hle/service/nvnflinger/nvnflinger.h" | 13 | #include "core/hle/service/nvnflinger/nvnflinger.h" |
| @@ -47,7 +50,7 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet> | |||
| 47 | {50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"}, | 50 | {50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"}, |
| 48 | {51, &ISelfController::ApproveToDisplay, "ApproveToDisplay"}, | 51 | {51, &ISelfController::ApproveToDisplay, "ApproveToDisplay"}, |
| 49 | {60, nullptr, "OverrideAutoSleepTimeAndDimmingTime"}, | 52 | {60, nullptr, "OverrideAutoSleepTimeAndDimmingTime"}, |
| 50 | {61, nullptr, "SetMediaPlaybackState"}, | 53 | {61, &ISelfController::SetMediaPlaybackState, "SetMediaPlaybackState"}, |
| 51 | {62, &ISelfController::SetIdleTimeDetectionExtension, "SetIdleTimeDetectionExtension"}, | 54 | {62, &ISelfController::SetIdleTimeDetectionExtension, "SetIdleTimeDetectionExtension"}, |
| 52 | {63, &ISelfController::GetIdleTimeDetectionExtension, "GetIdleTimeDetectionExtension"}, | 55 | {63, &ISelfController::GetIdleTimeDetectionExtension, "GetIdleTimeDetectionExtension"}, |
| 53 | {64, nullptr, "SetInputDetectionSourceSet"}, | 56 | {64, nullptr, "SetInputDetectionSourceSet"}, |
| @@ -324,6 +327,16 @@ void ISelfController::ApproveToDisplay(HLERequestContext& ctx) { | |||
| 324 | rb.Push(ResultSuccess); | 327 | rb.Push(ResultSuccess); |
| 325 | } | 328 | } |
| 326 | 329 | ||
| 330 | void ISelfController::SetMediaPlaybackState(HLERequestContext& ctx) { | ||
| 331 | IPC::RequestParser rp{ctx}; | ||
| 332 | const u8 state = rp.Pop<u8>(); | ||
| 333 | |||
| 334 | LOG_WARNING(Service_AM, "(STUBBED) called, state={}", state); | ||
| 335 | |||
| 336 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 337 | rb.Push(ResultSuccess); | ||
| 338 | } | ||
| 339 | |||
| 327 | void ISelfController::SetIdleTimeDetectionExtension(HLERequestContext& ctx) { | 340 | void ISelfController::SetIdleTimeDetectionExtension(HLERequestContext& ctx) { |
| 328 | IPC::RequestParser rp{ctx}; | 341 | IPC::RequestParser rp{ctx}; |
| 329 | 342 | ||
diff --git a/src/core/hle/service/am/self_controller.h b/src/core/hle/service/am/self_controller.h index a63bc2e74..ab21a1881 100644 --- a/src/core/hle/service/am/self_controller.h +++ b/src/core/hle/service/am/self_controller.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #pragma once | 4 | #pragma once |
| 5 | 5 | ||
| 6 | #include "core/hle/service/hle_ipc.h" | ||
| 6 | #include "core/hle/service/kernel_helpers.h" | 7 | #include "core/hle/service/kernel_helpers.h" |
| 7 | #include "core/hle/service/service.h" | 8 | #include "core/hle/service/service.h" |
| 8 | 9 | ||
| @@ -38,6 +39,7 @@ private: | |||
| 38 | void CreateManagedDisplaySeparableLayer(HLERequestContext& ctx); | 39 | void CreateManagedDisplaySeparableLayer(HLERequestContext& ctx); |
| 39 | void SetHandlesRequestToDisplay(HLERequestContext& ctx); | 40 | void SetHandlesRequestToDisplay(HLERequestContext& ctx); |
| 40 | void ApproveToDisplay(HLERequestContext& ctx); | 41 | void ApproveToDisplay(HLERequestContext& ctx); |
| 42 | void SetMediaPlaybackState(HLERequestContext& ctx); | ||
| 41 | void SetIdleTimeDetectionExtension(HLERequestContext& ctx); | 43 | void SetIdleTimeDetectionExtension(HLERequestContext& ctx); |
| 42 | void GetIdleTimeDetectionExtension(HLERequestContext& ctx); | 44 | void GetIdleTimeDetectionExtension(HLERequestContext& ctx); |
| 43 | void ReportUserIsActive(HLERequestContext& ctx); | 45 | void ReportUserIsActive(HLERequestContext& ctx); |