Skip to content

Commit

Permalink
Add/fix service reported info (#551)
Browse files Browse the repository at this point in the history
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")
  • Loading branch information
LotP1 authored Jan 20, 2025
1 parent 04ba762 commit e743d78
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,15 @@ public ResultCode GetDebugModeFlag(ServiceCtx context)
return ResultCode.Success;
}

[CommandCmif(68)]
// GetSerialNumber() -> buffer<nn::settings::system::SerialNumber, 0x16>
public ResultCode GetSerialNumber(ServiceCtx context)
{
context.ResponseData.Write(Encoding.ASCII.GetBytes("RYU00000000000"));

return ResultCode.Success;
}

[CommandCmif(77)]
// GetDeviceNickName() -> buffer<nn::settings::system::DeviceNickName, 0x16>
public ResultCode GetDeviceNickName(ServiceCtx context)
Expand Down
3 changes: 3 additions & 0 deletions src/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public ResultCode GetConfig(ServiceCtx context)

context.ResponseData.Write(configValue);

if (result == SmcResult.Success)
return ResultCode.Success;

return (ResultCode)((int)result << 9) | ResultCode.ModuleId;
}

Expand Down

0 comments on commit e743d78

Please sign in to comment.