mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-23 18:45:11 +00:00
3b531de670
* Implement mii:u and mii:e entirely Co-authored-by: AcK77 <Acoustik666@gmail.com> This commit implement the mii service accurately. This is based on Ac_k work but was polished and updated to 7.x. Please note that the following calls are partially implemented: - Convert: Used to convert from old console format (Wii/Wii U/3ds) - Import and Export: this is shouldn't be accesible in production mode. * Remove some debug leftovers * Make it possible to load an arbitrary mii database from a Switch * Address gdk's comments * Reduce visibility of all the Mii code * Address Ac_K's comments * Remove the StructLayout of DatabaseSessionMetadata * Add a missing line return in DatabaseSessionMetadata * Misc fixes and style changes * Fix some issues from last commit * Fix database server metadata UpdateCounter in MarkDirty (Thanks Moose for the catch) * MountCounter should only be incremented when no error is reported * Fix FixDatabase Co-authored-by: Alex Barney <thealexbarney@gmail.com>
32 lines
No EOL
954 B
C#
32 lines
No EOL
954 B
C#
using Ryujinx.Common;
|
|
using Ryujinx.HLE.HOS.Services.Mii.StaticService;
|
|
using Ryujinx.HLE.HOS.Services.Mii.Types;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Mii
|
|
{
|
|
[Service("mii:e", true)]
|
|
[Service("mii:u", false)]
|
|
class IStaticService : IpcService
|
|
{
|
|
private DatabaseImpl _databaseImpl;
|
|
|
|
private bool _isSystem;
|
|
|
|
public IStaticService(ServiceCtx context, bool isSystem)
|
|
{
|
|
_isSystem = isSystem;
|
|
_databaseImpl = DatabaseImpl.Instance;
|
|
}
|
|
|
|
[Command(0)]
|
|
// GetDatabaseService(u32 mii_key_code) -> object<nn::mii::detail::IDatabaseService>
|
|
public ResultCode GetDatabaseService(ServiceCtx context)
|
|
{
|
|
SpecialMiiKeyCode miiKeyCode = context.RequestData.ReadStruct<SpecialMiiKeyCode>();
|
|
|
|
MakeObject(context, new DatabaseServiceImpl(_databaseImpl, _isSystem, miiKeyCode));
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
}
|
|
} |