diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-10-17 14:15:50 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-10-17 14:15:50 -0300 |
| commit | b3a4662be15bd63d5b70cf4be21d79959e11ccfc (patch) | |
| tree | daca12b81aafcae1651e89c434f2e7cfd8a85132 /Ryujinx.HLE/HOS/Services/Nv | |
| parent | 9b19ea3c87518234fd72a6dead727eb5d8379c0d (diff) | |
Move logging to Ryujinx.Common and make it a static class (#413)
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Nv')
6 files changed, 48 insertions, 48 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs index 96de8cab..4f4c8add 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs @@ -1,4 +1,5 @@ using ChocolArm64.Memory; +using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel; using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS; @@ -6,7 +7,6 @@ using Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu; using Ryujinx.HLE.HOS.Services.Nv.NvHostChannel; using Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl; using Ryujinx.HLE.HOS.Services.Nv.NvMap; -using Ryujinx.HLE.Logging; using System; using System.Collections.Generic; @@ -146,7 +146,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv public long FinishInitialize(ServiceCtx Context) { - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return 0; } @@ -180,14 +180,14 @@ namespace Ryujinx.HLE.HOS.Services.Nv { if (CmdIn(Cmd) && Context.Request.GetBufferType0x21().Position == 0) { - Context.Device.Log.PrintError(LogClass.ServiceNv, "Input buffer is null!"); + Logger.PrintError(LogClass.ServiceNv, "Input buffer is null!"); return NvResult.InvalidInput; } if (CmdOut(Cmd) && Context.Request.GetBufferType0x22().Position == 0) { - Context.Device.Log.PrintError(LogClass.ServiceNv, "Output buffer is null!"); + Logger.PrintError(LogClass.ServiceNv, "Output buffer is null!"); return NvResult.InvalidInput; } diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs index 95eb5b98..0ccc1949 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs @@ -1,7 +1,7 @@ using ChocolArm64.Memory; +using Ryujinx.Common.Logging; using Ryujinx.Graphics.Memory; using Ryujinx.HLE.HOS.Services.Nv.NvMap; -using Ryujinx.HLE.Logging; using System; using System.Collections.Concurrent; @@ -42,7 +42,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -78,7 +78,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS { Args.Offset = 0; - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Failed to allocate size {Size:x16}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Failed to allocate size {Size:x16}!"); Result = NvResult.OutOfMemory; } @@ -115,7 +115,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS } else { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, + Logger.PrintWarning(LogClass.ServiceNv, $"Failed to free offset 0x{Args.Offset:x16} size 0x{Size:x16}!"); Result = NvResult.InvalidInput; @@ -145,7 +145,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS } else { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid buffer offset {Args.Offset:x16}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid buffer offset {Args.Offset:x16}!"); } } @@ -167,7 +167,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS if (Map == null) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap handle 0x{Args.NvMapHandle:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap handle 0x{Args.NvMapHandle:x8}!"); return NvResult.InvalidInput; } @@ -188,7 +188,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS { string Msg = string.Format(MapErrorMsg, VA, Args.MappingSize); - Context.Device.Log.PrintWarning(LogClass.ServiceNv, Msg); + Logger.PrintWarning(LogClass.ServiceNv, Msg); return NvResult.InvalidInput; } @@ -197,7 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS } else { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Address 0x{Args.Offset:x16} not mapped!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Address 0x{Args.Offset:x16} not mapped!"); return NvResult.InvalidInput; } @@ -231,7 +231,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS { string Msg = string.Format(MapErrorMsg, Args.Offset, Size); - Context.Device.Log.PrintWarning(LogClass.ServiceNv, Msg); + Logger.PrintWarning(LogClass.ServiceNv, Msg); Result = NvResult.InvalidInput; } @@ -245,7 +245,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS { Args.Offset = 0; - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Failed to map size 0x{Size:x16}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Failed to map size 0x{Size:x16}!"); Result = NvResult.InvalidInput; } @@ -265,7 +265,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -275,7 +275,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -296,7 +296,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS if (Map == null) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap handle 0x{Args.NvMapHandle:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid NvMap handle 0x{Args.NvMapHandle:x8}!"); return NvResult.InvalidInput; } @@ -306,7 +306,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS if (Result < 0) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, + Logger.PrintWarning(LogClass.ServiceNv, $"Page 0x{Args.Offset:x16} size 0x{Args.Pages:x16} not allocated!"); return NvResult.InvalidInput; diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs index 5ae45c1e..387fe5b4 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvGpuGpu/NvGpuGpuIoctl.cs @@ -1,5 +1,5 @@ using ChocolArm64.Memory; -using Ryujinx.HLE.Logging; +using Ryujinx.Common.Logging; using System; using System.Diagnostics; @@ -46,7 +46,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu AMemoryHelper.Write(Context.Memory, OutputPosition, Args); - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -70,7 +70,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu AMemoryHelper.Write(Context.Memory, OutputPosition, Args); - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -80,7 +80,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -163,7 +163,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu AMemoryHelper.Write(Context.Memory, OutputPosition, Args); - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs index f4ed4821..d2dd089d 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs @@ -1,7 +1,7 @@ using ChocolArm64.Memory; +using Ryujinx.Common.Logging; using Ryujinx.Graphics.Memory; using Ryujinx.HLE.HOS.Services.Nv.NvGpuAS; -using Ryujinx.HLE.Logging; using System; using System.Collections.Concurrent; @@ -57,7 +57,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -67,7 +67,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -110,7 +110,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -120,7 +120,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -130,7 +130,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -140,7 +140,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -150,7 +150,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel long InputPosition = Context.Request.GetBufferType0x21().Position; long OutputPosition = Context.Request.GetBufferType0x22().Position; - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs index 2bfe8882..0b70928e 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs @@ -1,5 +1,5 @@ using ChocolArm64.Memory; -using Ryujinx.HLE.Logging; +using Ryujinx.Common.Logging; using System; using System.Collections.Concurrent; using System.Text; @@ -95,7 +95,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl { if (StringValue.Length > 0x100) { - Context.Device.Log.PrintError(Logging.LogClass.ServiceNv, $"{Domain}!{Name} String value size is too big!"); + Logger.PrintError(LogClass.ServiceNv, $"{Domain}!{Name} String value size is too big!"); } else { @@ -118,7 +118,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl Context.Memory.WriteBytes(OutputPosition + 0x82, SettingBuffer); - Context.Device.Log.PrintDebug(Logging.LogClass.ServiceNv, $"Got setting {Domain}!{Name}"); + Logger.PrintDebug(LogClass.ServiceNv, $"Got setting {Domain}!{Name}"); } return NvResult.Success; @@ -144,7 +144,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl int EventId = Context.Memory.ReadInt32(InputPosition); - Context.Device.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + Logger.PrintStub(LogClass.ServiceNv, "Stubbed."); return NvResult.Success; } @@ -201,7 +201,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl } else { - Context.Device.Log.PrintDebug(LogClass.ServiceNv, "Waiting syncpt with timeout of " + Args.Timeout + "ms..."); + Logger.PrintDebug(LogClass.ServiceNv, "Waiting syncpt with timeout of " + Args.Timeout + "ms..."); using (ManualResetEvent WaitEvent = new ManualResetEvent(false)) { @@ -232,7 +232,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl } } - Context.Device.Log.PrintDebug(LogClass.ServiceNv, "Resuming..."); + Logger.PrintDebug(LogClass.ServiceNv, "Resuming..."); } if (Extended) diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs index 38da2889..7953d665 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs @@ -1,6 +1,6 @@ using ChocolArm64.Memory; +using Ryujinx.Common.Logging; using Ryujinx.Graphics.Memory; -using Ryujinx.HLE.Logging; using Ryujinx.HLE.Utilities; using System.Collections.Concurrent; @@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap case 0x010e: return GetId (Context); } - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Unsupported Ioctl command 0x{Cmd:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Unsupported Ioctl command 0x{Cmd:x8}!"); return NvResult.NotSupported; } @@ -43,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap if (Args.Size == 0) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid size 0x{Args.Size:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid size 0x{Args.Size:x8}!"); return NvResult.InvalidInput; } @@ -52,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap Args.Handle = AddNvMap(Context, new NvMapHandle(Size)); - Context.Device.Log.PrintInfo(LogClass.ServiceNv, $"Created map {Args.Handle} with size 0x{Size:x8}!"); + Logger.PrintInfo(LogClass.ServiceNv, $"Created map {Args.Handle} with size 0x{Size:x8}!"); AMemoryHelper.Write(Context.Memory, OutputPosition, Args); @@ -70,7 +70,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap if (Map == null) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); return NvResult.InvalidInput; } @@ -95,14 +95,14 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap if (Map == null) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); return NvResult.InvalidInput; } if ((Args.Align & (Args.Align - 1)) != 0) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid alignment 0x{Args.Align:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid alignment 0x{Args.Align:x8}!"); return NvResult.InvalidInput; } @@ -159,7 +159,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap if (Map == null) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); return NvResult.InvalidInput; } @@ -168,7 +168,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap { DeleteNvMap(Context, Args.Handle); - Context.Device.Log.PrintInfo(LogClass.ServiceNv, $"Deleted map {Args.Handle}!"); + Logger.PrintInfo(LogClass.ServiceNv, $"Deleted map {Args.Handle}!"); Args.Address = Map.Address; Args.Flags = 0; @@ -197,7 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap if (Map == null) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); return NvResult.InvalidInput; } @@ -231,7 +231,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap if (Map == null) { - Context.Device.Log.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); + Logger.PrintWarning(LogClass.ServiceNv, $"Invalid handle 0x{Args.Handle:x8}!"); return NvResult.InvalidInput; } |
