diff options
| author | Ac_K <Acoustik666@gmail.com> | 2018-02-25 19:58:16 +0100 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-02-25 15:58:16 -0300 |
| commit | e174100474fcfe484cc8e93c4db447886096615d (patch) | |
| tree | 062d3437e791e173c86788dcbf58875c293ca3c8 /Ryujinx.Core/OsHle/Services/Set | |
| parent | fba0bf873257c4ac17f4584036661be08a1694d3 (diff) | |
Implement many objects, improve logging. (#42)
* Implement many objects, improve logging.
Change and rename folders of Services
Add Logging of IpcMessage.
Add "lm" Log Service.
Parse Errors of SetTerminateResult
Add Svc Calls.
Add many object implementations.
* Corrections
Forgotten Debug Conf
* Corrections 2
* Corrections 3
* Corrections 4
Diffstat (limited to 'Ryujinx.Core/OsHle/Services/Set')
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Set/ServiceSet.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Ryujinx.Core/OsHle/Services/Set/ServiceSet.cs b/Ryujinx.Core/OsHle/Services/Set/ServiceSet.cs new file mode 100644 index 00000000..05e409b0 --- /dev/null +++ b/Ryujinx.Core/OsHle/Services/Set/ServiceSet.cs @@ -0,0 +1,46 @@ +using ChocolArm64.Memory; +using Ryujinx.Core.OsHle.Ipc; +using System.Collections.Generic; + +namespace Ryujinx.Core.OsHle.IpcServices.Set +{ + class ServiceSet : IIpcService + { + private Dictionary<int, ServiceProcessRequest> m_Commands; + + public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; + + public ServiceSet() + { + m_Commands = new Dictionary<int, ServiceProcessRequest>() + { + { 1, GetAvailableLanguageCodes } + }; + } + + private const int LangCodesCount = 13; + + public static long GetAvailableLanguageCodes(ServiceCtx Context) + { + int PtrBuffSize = Context.RequestData.ReadInt32(); + + if (Context.Request.RecvListBuff.Count > 0) + { + long Position = Context.Request.RecvListBuff[0].Position; + short Size = Context.Request.RecvListBuff[0].Size; + + //This should return an array of ints with values matching the LanguageCode enum. + byte[] Data = new byte[Size]; + + Data[0] = 0; + Data[1] = 1; + + AMemoryHelper.WriteBytes(Context.Memory, Position, Data); + } + + Context.ResponseData.Write(LangCodesCount); + + return 0; + } + } +}
\ No newline at end of file |
