From f0b8d4d8405980a4b7d2339a0ade9d3948641fad Mon Sep 17 00:00:00 2001 From: lizzie Date: Fri, 22 May 2026 01:22:10 +0000 Subject: [PATCH] fx --- src/core/hle/service/am/applet.h | 3 ++- .../hle/service/am/service/application_functions.cpp | 10 +++++++++- .../hle/service/am/service/application_functions.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/am/applet.h b/src/core/hle/service/am/applet.h index a693a47d7a..1121fe221e 100644 --- a/src/core/hle/service/am/applet.h +++ b/src/core/hle/service/am/applet.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project @@ -83,6 +83,7 @@ struct Applet { // Application functions bool game_play_recording_supported{}; + bool media_playback_state{}; GamePlayRecordingState game_play_recording_state{GamePlayRecordingState::Disabled}; bool jit_service_launched{}; bool application_crash_report_enabled{}; diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp index 9ab343e59e..787c88f52d 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp @@ -11,6 +11,7 @@ #include "core/file_sys/registered_cache.h" #include "core/file_sys/savedata_factory.h" #include "core/hle/kernel/k_transfer_memory.h" +#include "core/hle/result.h" #include "core/hle/service/am/am_results.h" #include "core/hle/service/am/applet.h" #include "core/hle/service/am/service/application_functions.h" @@ -56,7 +57,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_ {37, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"}, {40, D<&IApplicationFunctions::NotifyRunning>, "NotifyRunning"}, {50, D<&IApplicationFunctions::GetPseudoDeviceId>, "GetPseudoDeviceId"}, - {60, nullptr, "SetMediaPlaybackStateForApplication"}, + {60, D<&IApplicationFunctions::SetMediaPlaybackStateForApplication>, "SetMediaPlaybackStateForApplication"}, {65, D<&IApplicationFunctions::IsGamePlayRecordingSupported>, "IsGamePlayRecordingSupported"}, {66, D<&IApplicationFunctions::InitializeGamePlayRecording>, "InitializeGamePlayRecording"}, {67, D<&IApplicationFunctions::SetGamePlayRecordingState>, "SetGamePlayRecordingState"}, @@ -364,6 +365,13 @@ Result IApplicationFunctions::InitializeGamePlayRecording( R_SUCCEED(); } +Result IApplicationFunctions::SetMediaPlaybackStateForApplication(bool enabled) { + LOG_WARNING(Service_AM, "(stubbed) {}", enabled); + std::scoped_lock lk{m_applet->lock}; + m_applet->media_playback_state = enabled; + R_SUCCEED(); +} + Result IApplicationFunctions::SetGamePlayRecordingState( GamePlayRecordingState game_play_recording_state) { LOG_WARNING(Service_AM, "(STUBBED) called"); diff --git a/src/core/hle/service/am/service/application_functions.h b/src/core/hle/service/am/service/application_functions.h index abee2f9d47..b97ed7e25e 100644 --- a/src/core/hle/service/am/service/application_functions.h +++ b/src/core/hle/service/am/service/application_functions.h @@ -53,6 +53,7 @@ private: Result IsGamePlayRecordingSupported(Out out_is_game_play_recording_supported); Result InitializeGamePlayRecording( u64 transfer_memory_size, InCopyHandle transfer_memory_handle); + Result SetMediaPlaybackStateForApplication(bool enabled); Result SetGamePlayRecordingState(GamePlayRecordingState game_play_recording_state); Result EnableApplicationCrashReport(bool enabled); Result InitializeApplicationCopyrightFrameBuffer(