From e743d7811576fe7257cc22c7291a3d926687fe01 Mon Sep 17 00:00:00 2001 From: LotP1 <68976644+LotP1@users.noreply.github.com> Date: Mon, 20 Jan 2025 21:59:54 +0100 Subject: [PATCH] Add/fix service reported info (#551) fixes the GetConfig service call, which now returns success correctly adds support for getting the device serial number (which is fake and reports as "RYU00000000000") --- .../HOS/Services/Settings/ISystemSettingsServer.cs | 9 +++++++++ src/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs b/src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs index 65748be33..846c4dc4f 100644 --- a/src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs @@ -244,6 +244,15 @@ namespace Ryujinx.HLE.HOS.Services.Settings return ResultCode.Success; } + [CommandCmif(68)] + // GetSerialNumber() -> buffer + public ResultCode GetSerialNumber(ServiceCtx context) + { + context.ResponseData.Write(Encoding.ASCII.GetBytes("RYU00000000000")); + + return ResultCode.Success; + } + [CommandCmif(77)] // GetDeviceNickName() -> buffer public ResultCode GetDeviceNickName(ServiceCtx context) diff --git a/src/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs b/src/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs index 4a2a910f8..ade67b9c0 100644 --- a/src/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs +++ b/src/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs @@ -51,6 +51,9 @@ namespace Ryujinx.HLE.HOS.Services.Spl context.ResponseData.Write(configValue); + if (result == SmcResult.Success) + return ResultCode.Success; + return (ResultCode)((int)result << 9) | ResultCode.ModuleId; }