diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-06-10 21:46:42 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-06-10 21:46:42 -0300 |
| commit | 76f3b1b3a4637ec72abfbb8cbc0679f2e0ca838f (patch) | |
| tree | 0411b709de31c1c0517763512df8eeb9f7491bc9 /Ryujinx.Core/OsHle/Services/Lm | |
| parent | 518fe799da6dd4f12c58c9e6e174767effb0b868 (diff) | |
Rename Ryujinx.Core to Ryujinx.HLE and add a separate project for a future LLE implementation
Diffstat (limited to 'Ryujinx.Core/OsHle/Services/Lm')
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Lm/ILogService.cs | 27 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Lm/ILogger.cs | 86 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Lm/LmLogField.cs | 13 | ||||
| -rw-r--r-- | Ryujinx.Core/OsHle/Services/Lm/LmLogLevel.cs | 11 |
4 files changed, 0 insertions, 137 deletions
diff --git a/Ryujinx.Core/OsHle/Services/Lm/ILogService.cs b/Ryujinx.Core/OsHle/Services/Lm/ILogService.cs deleted file mode 100644 index 3315cf4c..00000000 --- a/Ryujinx.Core/OsHle/Services/Lm/ILogService.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Ryujinx.Core.OsHle.Ipc; -using System.Collections.Generic; - -namespace Ryujinx.Core.OsHle.Services.Lm -{ - class ILogService : IpcService - { - private Dictionary<int, ServiceProcessRequest> m_Commands; - - public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; - - public ILogService() - { - m_Commands = new Dictionary<int, ServiceProcessRequest>() - { - { 0, Initialize } - }; - } - - public long Initialize(ServiceCtx Context) - { - MakeObject(Context, new ILogger()); - - return 0; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.Core/OsHle/Services/Lm/ILogger.cs b/Ryujinx.Core/OsHle/Services/Lm/ILogger.cs deleted file mode 100644 index 41f3710b..00000000 --- a/Ryujinx.Core/OsHle/Services/Lm/ILogger.cs +++ /dev/null @@ -1,86 +0,0 @@ -using Ryujinx.Core.Logging; -using Ryujinx.Core.OsHle.Ipc; -using System.Collections.Generic; -using System.IO; -using System.Text; - -namespace Ryujinx.Core.OsHle.Services.Lm -{ - class ILogger : IpcService - { - private Dictionary<int, ServiceProcessRequest> m_Commands; - - public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; - - public ILogger() - { - m_Commands = new Dictionary<int, ServiceProcessRequest>() - { - { 0, Log } - }; - } - - public long Log(ServiceCtx Context) - { - byte[] LogBuffer = Context.Memory.ReadBytes( - Context.Request.PtrBuff[0].Position, - Context.Request.PtrBuff[0].Size); - - using (MemoryStream MS = new MemoryStream(LogBuffer)) - { - BinaryReader Reader = new BinaryReader(MS); - - long Pid = Reader.ReadInt64(); - long ThreadContext = Reader.ReadInt64(); - short Flags = Reader.ReadInt16(); - byte Level = Reader.ReadByte(); - byte Verbosity = Reader.ReadByte(); - int PayloadLength = Reader.ReadInt32(); - - StringBuilder SB = new StringBuilder(); - - SB.AppendLine("Guest log:"); - - while (MS.Position < MS.Length) - { - byte Type = Reader.ReadByte(); - byte Size = Reader.ReadByte(); - - LmLogField Field = (LmLogField)Type; - - string FieldStr = string.Empty; - - if (Field == LmLogField.Skip) - { - Reader.ReadByte(); - - continue; - } - else if (Field == LmLogField.Line) - { - FieldStr = Field + ": " + Reader.ReadInt32(); - } - else - { - FieldStr = Field + ": \"" + Encoding.UTF8.GetString(Reader.ReadBytes(Size)) + "\""; - } - - SB.AppendLine(" " + FieldStr); - } - - string Text = SB.ToString(); - - switch((LmLogLevel)Level) - { - case LmLogLevel.Trace: Context.Ns.Log.PrintDebug (LogClass.ServiceLm, Text); break; - case LmLogLevel.Info: Context.Ns.Log.PrintInfo (LogClass.ServiceLm, Text); break; - case LmLogLevel.Warning: Context.Ns.Log.PrintWarning(LogClass.ServiceLm, Text); break; - case LmLogLevel.Error: Context.Ns.Log.PrintError (LogClass.ServiceLm, Text); break; - case LmLogLevel.Critical: Context.Ns.Log.PrintError (LogClass.ServiceLm, Text); break; - } - } - - return 0; - } - } -} diff --git a/Ryujinx.Core/OsHle/Services/Lm/LmLogField.cs b/Ryujinx.Core/OsHle/Services/Lm/LmLogField.cs deleted file mode 100644 index 2906c7c3..00000000 --- a/Ryujinx.Core/OsHle/Services/Lm/LmLogField.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Ryujinx.Core.OsHle.Services.Lm -{ - enum LmLogField - { - Skip = 1, - Message = 2, - Line = 3, - Filename = 4, - Function = 5, - Module = 6, - Thread = 7 - } -}
\ No newline at end of file diff --git a/Ryujinx.Core/OsHle/Services/Lm/LmLogLevel.cs b/Ryujinx.Core/OsHle/Services/Lm/LmLogLevel.cs deleted file mode 100644 index f5c66233..00000000 --- a/Ryujinx.Core/OsHle/Services/Lm/LmLogLevel.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Ryujinx.Core.OsHle.Services.Lm -{ - enum LmLogLevel - { - Trace, - Info, - Warning, - Error, - Critical - } -}
\ No newline at end of file |
