Move logging to Ryujinx.Common and make it a static class (#413)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.Logging;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Am
|
||||
@@ -39,7 +39,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
long UIdLow = Context.RequestData.ReadInt64();
|
||||
long UIdHigh = Context.RequestData.ReadInt64();
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
string Result = GetFormattedErrorCode(ErrorCode);
|
||||
|
||||
Context.Device.Log.PrintInfo(LogClass.ServiceAm, $"Result = 0x{ErrorCode:x8} ({Result}).");
|
||||
Logger.PrintInfo(LogClass.ServiceAm, $"Result = 0x{ErrorCode:x8} ({Result}).");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
public long GetPseudoDeviceId(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0L);
|
||||
Context.ResponseData.Write(0L);
|
||||
@@ -100,7 +100,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
public long InitializeGamePlayRecording(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
int State = Context.RequestData.ReadInt32();
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.Logging;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Am
|
||||
@@ -27,7 +27,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
float AppletVolume = Context.RequestData.ReadSingle();
|
||||
float LibraryAppletVolume = Context.RequestData.ReadSingle();
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
Context.ResponseData.Write(1f);
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
Context.ResponseData.Write(1f);
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
float Unknown0 = Context.RequestData.ReadSingle();
|
||||
long Unknown1 = Context.RequestData.ReadInt64();
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
float Unknown0 = Context.RequestData.ReadSingle();
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.HOS.Kernel;
|
||||
using Ryujinx.HLE.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
Context.ResponseData.Write((byte)0); //Unknown value.
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.HOS.Kernel;
|
||||
using Ryujinx.HLE.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
public long RequestToGetForeground(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.HOS.Kernel;
|
||||
using Ryujinx.HLE.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -39,28 +39,28 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long Start(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetResult(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long PushInData(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.HOS.Kernel;
|
||||
using Ryujinx.HLE.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -41,21 +41,21 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
public long Exit(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long LockExit(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long UnlockExit(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
bool Flag2 = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
bool Flag3 = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
int Orientation = Context.RequestData.ReadInt32();
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
IdleTimeDetectionExtension = Context.RequestData.ReadInt32();
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, $"Stubbed. IdleTimeDetectionExtension: {IdleTimeDetectionExtension}");
|
||||
Logger.PrintStub(LogClass.ServiceAm, $"Stubbed. IdleTimeDetectionExtension: {IdleTimeDetectionExtension}");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -165,7 +165,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
{
|
||||
Context.ResponseData.Write(IdleTimeDetectionExtension);
|
||||
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, $"Stubbed. IdleTimeDetectionExtension: {IdleTimeDetectionExtension}");
|
||||
Logger.PrintStub(LogClass.ServiceAm, $"Stubbed. IdleTimeDetectionExtension: {IdleTimeDetectionExtension}");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using Ryujinx.HLE.Logging;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Am
|
||||
@@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
public long GetAppletResourceUserId(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
Context.ResponseData.Write(0L);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||
|
||||
public long AcquireForegroundRights(ServiceCtx Context)
|
||||
{
|
||||
Context.Device.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user