From ab571e81b31b90b8e43cf0388a8f4afb94089621 Mon Sep 17 00:00:00 2001 From: Princess Piplup Date: Thu, 4 Dec 2025 17:35:17 -0600 Subject: [PATCH] Fix SaveCurrentScreenshot This fixes SaveCurrentScreenshot so it correctly saves the screenshot into the screenshot folder, it's no longer a stub I was going to add the capture button so all games worked but tbh I only care for spongebob games tested Pokemon Z-A: https://files.raychu.xyz/u/1FaUGV.png Pokemon Violet: https://files.raychu.xyz/u/6swfVS.png Pokemon Violet: https://files.raychu.xyz/u/JaBBX2.png Spongebob The Cosmic Shake: https://files.raychu.xyz/u/8z5X2e.png --- .../SystemAppletProxy/ISelfController.cs | 2 +- src/Ryujinx.HLE/UI/IHostUIHandler.cs | 5 +++++ src/Ryujinx/Headless/WindowBase.cs | 5 +++++ src/Ryujinx/UI/Applet/AvaHostUIHandler.cs | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs b/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs index 8e0f515ba..7aac6f3ea 100644 --- a/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs +++ b/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/AllSystemAppletProxiesService/SystemAppletProxy/ISelfController.cs @@ -416,7 +416,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys return ResultCode.InvalidParameters; } - Logger.Stub?.PrintStub(LogClass.ServiceAm, new { albumReportOption }); + context.Device.UIHandler.TakeScreenshot(); return ResultCode.Success; } diff --git a/src/Ryujinx.HLE/UI/IHostUIHandler.cs b/src/Ryujinx.HLE/UI/IHostUIHandler.cs index 1beec55d9..f33c8d7aa 100644 --- a/src/Ryujinx.HLE/UI/IHostUIHandler.cs +++ b/src/Ryujinx.HLE/UI/IHostUIHandler.cs @@ -60,5 +60,10 @@ namespace Ryujinx.HLE.UI /// Gets fonts and colors used by the host. /// IHostUITheme HostUITheme { get; } + + /// + /// Takes a screenshot from the current renderer and saves it in the screenshots folder. + /// + void TakeScreenshot(); } } diff --git a/src/Ryujinx/Headless/WindowBase.cs b/src/Ryujinx/Headless/WindowBase.cs index 43d47911e..641a0aea6 100644 --- a/src/Ryujinx/Headless/WindowBase.cs +++ b/src/Ryujinx/Headless/WindowBase.cs @@ -571,5 +571,10 @@ namespace Ryujinx.Headless SDL2Driver.Instance.Dispose(); } } + + public void TakeScreenshot() + { + throw new NotImplementedException(); + } } } diff --git a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs index c13a85d1a..efcb7888b 100644 --- a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs +++ b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs @@ -260,5 +260,10 @@ namespace Ryujinx.Ava.UI.Applet { return new AvaloniaDynamicTextInputHandler(_parent); } + + public void TakeScreenshot() + { + _parent.ViewModel.AppHost.ScreenshotRequested = true; + } } }