From a79b39b91347816ea14677b58af738b70df03e9c Mon Sep 17 00:00:00 2001 From: Ac_K Date: Mon, 28 Jun 2021 20:54:45 +0200 Subject: no name: Mii Editor applet support (#2419) * no name: Mii Editor applet support * addresses gdkchan feedback * Fix comment * Bypass MountCounter of MiiDatabaseManager * Fix GetSettingsPlatformRegion * Disable Applet Menu for unsupported firmwares --- .../HOS/Services/Settings/ISystemSettingsServer.cs | 15 +++++++++++++++ Ryujinx.HLE/HOS/Services/Settings/Types/PlatformRegion.cs | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 Ryujinx.HLE/HOS/Services/Settings/Types/PlatformRegion.cs (limited to 'Ryujinx.HLE/HOS/Services/Settings') diff --git a/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs b/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs index 66b768ee..1a437289 100644 --- a/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs +++ b/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs @@ -7,6 +7,7 @@ using LibHac.FsSystem.NcaUtils; using Ryujinx.Common.Logging; using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.HOS.SystemState; +using Ryujinx.HLE.Utilities; using System; using System.IO; using System.Text; @@ -271,6 +272,20 @@ namespace Ryujinx.HLE.HOS.Services.Settings return ResultCode.Success; } + [CommandHipc(90)] + // GetMiiAuthorId() -> nn::util::Uuid + public ResultCode GetMiiAuthorId(ServiceCtx context) + { + // NOTE: If miiAuthorId is null ResultCode.NullMiiAuthorIdBuffer is returned. + // Doesn't occur in our case. + + UInt128 miiAuthorId = Mii.Helper.GetDeviceId(); + + miiAuthorId.Write(context.ResponseData); + + return ResultCode.Success; + } + public byte[] GetFirmwareData(Switch device) { const ulong SystemVersionTitleId = 0x0100000000000809; diff --git a/Ryujinx.HLE/HOS/Services/Settings/Types/PlatformRegion.cs b/Ryujinx.HLE/HOS/Services/Settings/Types/PlatformRegion.cs new file mode 100644 index 00000000..b8ef8e8e --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Settings/Types/PlatformRegion.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.HOS.Services.Settings.Types +{ + enum PlatformRegion + { + Global = 1, + China = 2 + } +} \ No newline at end of file -- cgit v1.2.3