diff options
author | Liam <byteslice@airmail.cc> | 2024-02-03 06:48:35 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-09 15:20:53 +0100 |
commit | 70590f79f8fd26d10274dca0b9a3f05f3c0ebd9e (patch) | |
tree | bad26bf2b570f0de738f10dedd08be0c47e89117 /src/core/hle/service | |
parent | general: add default configurations for applet mode (diff) | |
download | yuzu-70590f79f8fd26d10274dca0b9a3f05f3c0ebd9e.tar yuzu-70590f79f8fd26d10274dca0b9a3f05f3c0ebd9e.tar.gz yuzu-70590f79f8fd26d10274dca0b9a3f05f3c0ebd9e.tar.bz2 yuzu-70590f79f8fd26d10274dca0b9a3f05f3c0ebd9e.tar.lz yuzu-70590f79f8fd26d10274dca0b9a3f05f3c0ebd9e.tar.xz yuzu-70590f79f8fd26d10274dca0b9a3f05f3c0ebd9e.tar.zst yuzu-70590f79f8fd26d10274dca0b9a3f05f3c0ebd9e.zip |
Diffstat (limited to 'src/core/hle/service')
-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 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/logging/log.h" +#include "core/hle/result.h" #include "core/hle/service/am/am_results.h" #include "core/hle/service/am/frontend/applets.h" #include "core/hle/service/am/self_controller.h" #include "core/hle/service/caps/caps_su.h" +#include "core/hle/service/hle_ipc.h" #include "core/hle/service/ipc_helpers.h" #include "core/hle/service/nvnflinger/fb_share_buffer_manager.h" #include "core/hle/service/nvnflinger/nvnflinger.h" @@ -47,7 +50,7 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet> {50, &ISelfController::SetHandlesRequestToDisplay, "SetHandlesRequestToDisplay"}, {51, &ISelfController::ApproveToDisplay, "ApproveToDisplay"}, {60, nullptr, "OverrideAutoSleepTimeAndDimmingTime"}, - {61, nullptr, "SetMediaPlaybackState"}, + {61, &ISelfController::SetMediaPlaybackState, "SetMediaPlaybackState"}, {62, &ISelfController::SetIdleTimeDetectionExtension, "SetIdleTimeDetectionExtension"}, {63, &ISelfController::GetIdleTimeDetectionExtension, "GetIdleTimeDetectionExtension"}, {64, nullptr, "SetInputDetectionSourceSet"}, @@ -324,6 +327,16 @@ void ISelfController::ApproveToDisplay(HLERequestContext& ctx) { rb.Push(ResultSuccess); } +void ISelfController::SetMediaPlaybackState(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const u8 state = rp.Pop<u8>(); + + LOG_WARNING(Service_AM, "(STUBBED) called, state={}", state); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + void ISelfController::SetIdleTimeDetectionExtension(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; 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 @@ #pragma once +#include "core/hle/service/hle_ipc.h" #include "core/hle/service/kernel_helpers.h" #include "core/hle/service/service.h" @@ -38,6 +39,7 @@ private: void CreateManagedDisplaySeparableLayer(HLERequestContext& ctx); void SetHandlesRequestToDisplay(HLERequestContext& ctx); void ApproveToDisplay(HLERequestContext& ctx); + void SetMediaPlaybackState(HLERequestContext& ctx); void SetIdleTimeDetectionExtension(HLERequestContext& ctx); void GetIdleTimeDetectionExtension(HLERequestContext& ctx); void ReportUserIsActive(HLERequestContext& ctx); |