Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a113ed0811 | ||
|
747876dc67 | ||
|
95cc18a7b4 |
@@ -1,10 +1,8 @@
|
|||||||
namespace ARMeilleure.Decoders
|
namespace ARMeilleure.Decoders
|
||||||
{
|
{
|
||||||
interface IOpCode32Alu : IOpCode32
|
interface IOpCode32Alu : IOpCode32, IOpCode32HasSetFlags
|
||||||
{
|
{
|
||||||
int Rd { get; }
|
int Rd { get; }
|
||||||
int Rn { get; }
|
int Rn { get; }
|
||||||
|
|
||||||
bool? SetFlags { get; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
7
ARMeilleure/Decoders/IOpCode32HasSetFlags.cs
Normal file
7
ARMeilleure/Decoders/IOpCode32HasSetFlags.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ARMeilleure.Decoders
|
||||||
|
{
|
||||||
|
interface IOpCode32HasSetFlags
|
||||||
|
{
|
||||||
|
bool? SetFlags { get; }
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
namespace ARMeilleure.Decoders
|
namespace ARMeilleure.Decoders
|
||||||
{
|
{
|
||||||
class OpCode32AluUmull : OpCode32
|
class OpCode32AluUmull : OpCode32, IOpCode32HasSetFlags
|
||||||
{
|
{
|
||||||
public int RdLo { get; }
|
public int RdLo { get; }
|
||||||
public int RdHi { get; }
|
public int RdHi { get; }
|
||||||
|
@@ -14,7 +14,7 @@ namespace ARMeilleure.Instructions
|
|||||||
{
|
{
|
||||||
public static bool ShouldSetFlags(ArmEmitterContext context)
|
public static bool ShouldSetFlags(ArmEmitterContext context)
|
||||||
{
|
{
|
||||||
IOpCode32Alu op = (IOpCode32Alu)context.CurrOp;
|
IOpCode32HasSetFlags op = (IOpCode32HasSetFlags)context.CurrOp;
|
||||||
|
|
||||||
if (op.SetFlags == null)
|
if (op.SetFlags == null)
|
||||||
{
|
{
|
||||||
|
@@ -39,6 +39,7 @@ namespace Ryujinx.Common.Logging
|
|||||||
ServiceLm,
|
ServiceLm,
|
||||||
ServiceMii,
|
ServiceMii,
|
||||||
ServiceMm,
|
ServiceMm,
|
||||||
|
ServiceMnpp,
|
||||||
ServiceNfc,
|
ServiceNfc,
|
||||||
ServiceNfp,
|
ServiceNfp,
|
||||||
ServiceNgct,
|
ServiceNgct,
|
||||||
|
@@ -9,6 +9,7 @@ namespace Ryujinx.Common.Logging
|
|||||||
Error,
|
Error,
|
||||||
Guest,
|
Guest,
|
||||||
AccessLog,
|
AccessLog,
|
||||||
Notice
|
Notice,
|
||||||
|
Trace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -90,6 +90,7 @@ namespace Ryujinx.Common.Logging
|
|||||||
public static Log? Guest { get; private set; }
|
public static Log? Guest { get; private set; }
|
||||||
public static Log? AccessLog { get; private set; }
|
public static Log? AccessLog { get; private set; }
|
||||||
public static Log? Stub { get; private set; }
|
public static Log? Stub { get; private set; }
|
||||||
|
public static Log? Trace { get; private set; }
|
||||||
public static Log Notice { get; } // Always enabled
|
public static Log Notice { get; } // Always enabled
|
||||||
|
|
||||||
static Logger()
|
static Logger()
|
||||||
@@ -117,6 +118,7 @@ namespace Ryujinx.Common.Logging
|
|||||||
Error = new Log(LogLevel.Error);
|
Error = new Log(LogLevel.Error);
|
||||||
Warning = new Log(LogLevel.Warning);
|
Warning = new Log(LogLevel.Warning);
|
||||||
Info = new Log(LogLevel.Info);
|
Info = new Log(LogLevel.Info);
|
||||||
|
Trace = new Log(LogLevel.Trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RestartTime()
|
public static void RestartTime()
|
||||||
@@ -172,7 +174,7 @@ namespace Ryujinx.Common.Logging
|
|||||||
|
|
||||||
public static IReadOnlyCollection<LogLevel> GetEnabledLevels()
|
public static IReadOnlyCollection<LogLevel> GetEnabledLevels()
|
||||||
{
|
{
|
||||||
var logs = new Log?[] { Debug, Info, Warning, Error, Guest, AccessLog, Stub };
|
var logs = new Log?[] { Debug, Info, Warning, Error, Guest, AccessLog, Stub, Trace };
|
||||||
List<LogLevel> levels = new List<LogLevel>(logs.Length);
|
List<LogLevel> levels = new List<LogLevel>(logs.Length);
|
||||||
foreach (var log in logs)
|
foreach (var log in logs)
|
||||||
{
|
{
|
||||||
@@ -196,6 +198,7 @@ namespace Ryujinx.Common.Logging
|
|||||||
case LogLevel.Guest : Guest = enabled ? new Log(LogLevel.Guest) : new Log?(); break;
|
case LogLevel.Guest : Guest = enabled ? new Log(LogLevel.Guest) : new Log?(); break;
|
||||||
case LogLevel.AccessLog : AccessLog = enabled ? new Log(LogLevel.AccessLog): new Log?(); break;
|
case LogLevel.AccessLog : AccessLog = enabled ? new Log(LogLevel.AccessLog): new Log?(); break;
|
||||||
case LogLevel.Stub : Stub = enabled ? new Log(LogLevel.Stub) : new Log?(); break;
|
case LogLevel.Stub : Stub = enabled ? new Log(LogLevel.Stub) : new Log?(); break;
|
||||||
|
case LogLevel.Trace : Trace = enabled ? new Log(LogLevel.Trace) : new Log?(); break;
|
||||||
default: throw new ArgumentException("Unknown Log Level");
|
default: throw new ArgumentException("Unknown Log Level");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,7 @@ namespace Ryujinx.Common.Logging
|
|||||||
LogLevel.Error => ConsoleColor.Red,
|
LogLevel.Error => ConsoleColor.Red,
|
||||||
LogLevel.Stub => ConsoleColor.DarkGray,
|
LogLevel.Stub => ConsoleColor.DarkGray,
|
||||||
LogLevel.Notice => ConsoleColor.Cyan,
|
LogLevel.Notice => ConsoleColor.Cyan,
|
||||||
|
LogLevel.Trace => ConsoleColor.DarkCyan,
|
||||||
_ => ConsoleColor.Gray,
|
_ => ConsoleColor.Gray,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -479,7 +479,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger.Debug?.Print(LogClass.KernelSvc, $"{svcName} returned result {result}.");
|
Logger.Trace?.Print(LogClass.KernelSvc, $"{svcName} returned result {result}.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,12 +15,12 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
|||||||
// GetAppletResourceUserId() -> nn::applet::AppletResourceUserId
|
// GetAppletResourceUserId() -> nn::applet::AppletResourceUserId
|
||||||
public ResultCode GetAppletResourceUserId(ServiceCtx context)
|
public ResultCode GetAppletResourceUserId(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
|
||||||
|
|
||||||
long appletResourceUserId = context.Device.System.AppletState.AppletResourceUserIds.Add(_pid);
|
long appletResourceUserId = context.Device.System.AppletState.AppletResourceUserIds.Add(_pid);
|
||||||
|
|
||||||
context.ResponseData.Write(appletResourceUserId);
|
context.ResponseData.Write(appletResourceUserId);
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceAm, new { appletResourceUserId });
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,6 +24,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
private bool _vibrationPermitted;
|
private bool _vibrationPermitted;
|
||||||
private bool _usbFullKeyControllerEnabled;
|
private bool _usbFullKeyControllerEnabled;
|
||||||
private bool _isFirmwareUpdateAvailableForSixAxisSensor;
|
private bool _isFirmwareUpdateAvailableForSixAxisSensor;
|
||||||
|
private bool _isSixAxisSensorUnalteredPassthroughEnabled;
|
||||||
|
|
||||||
private HidNpadJoyAssignmentMode _npadJoyAssignmentMode;
|
private HidNpadJoyAssignmentMode _npadJoyAssignmentMode;
|
||||||
private HidNpadHandheldActivationMode _npadHandheldActivationMode;
|
private HidNpadHandheldActivationMode _npadHandheldActivationMode;
|
||||||
@@ -335,7 +336,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// StartSixAxisSensor(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
// StartSixAxisSensor(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode StartSixAxisSensor(ServiceCtx context)
|
public ResultCode StartSixAxisSensor(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
||||||
@@ -347,7 +349,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// StopSixAxisSensor(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
// StopSixAxisSensor(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode StopSixAxisSensor(ServiceCtx context)
|
public ResultCode StopSixAxisSensor(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
||||||
@@ -359,7 +362,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// IsSixAxisSensorFusionEnabled(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> bool IsEnabled
|
// IsSixAxisSensorFusionEnabled(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> bool IsEnabled
|
||||||
public ResultCode IsSixAxisSensorFusionEnabled(ServiceCtx context)
|
public ResultCode IsSixAxisSensorFusionEnabled(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
context.ResponseData.Write(_sixAxisSensorFusionEnabled);
|
context.ResponseData.Write(_sixAxisSensorFusionEnabled);
|
||||||
@@ -373,9 +377,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// EnableSixAxisSensorFusion(bool Enabled, nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
// EnableSixAxisSensorFusion(bool Enabled, nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode EnableSixAxisSensorFusion(ServiceCtx context)
|
public ResultCode EnableSixAxisSensorFusion(ServiceCtx context)
|
||||||
{
|
{
|
||||||
_sixAxisSensorFusionEnabled = context.RequestData.ReadBoolean();
|
_sixAxisSensorFusionEnabled = context.RequestData.ReadUInt32() != 0;
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _sixAxisSensorFusionEnabled });
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _sixAxisSensorFusionEnabled });
|
||||||
|
|
||||||
@@ -386,7 +390,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// SetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, float RevisePower, float ReviseRange, nn::applet::AppletResourceUserId)
|
// SetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, float RevisePower, float ReviseRange, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode SetSixAxisSensorFusionParameters(ServiceCtx context)
|
public ResultCode SetSixAxisSensorFusionParameters(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
|
|
||||||
_sensorFusionParams = new HidSensorFusionParameters
|
_sensorFusionParams = new HidSensorFusionParameters
|
||||||
{
|
{
|
||||||
@@ -405,7 +410,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// GetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> float RevisePower, float ReviseRange)
|
// GetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> float RevisePower, float ReviseRange)
|
||||||
public ResultCode GetSixAxisSensorFusionParameters(ServiceCtx context)
|
public ResultCode GetSixAxisSensorFusionParameters(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
context.ResponseData.Write(_sensorFusionParams.RevisePower);
|
context.ResponseData.Write(_sensorFusionParams.RevisePower);
|
||||||
@@ -420,7 +426,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// ResetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
// ResetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode ResetSixAxisSensorFusionParameters(ServiceCtx context)
|
public ResultCode ResetSixAxisSensorFusionParameters(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
_sensorFusionParams.RevisePower = 0;
|
_sensorFusionParams.RevisePower = 0;
|
||||||
@@ -436,6 +443,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
public ResultCode SetAccelerometerParameters(ServiceCtx context)
|
public ResultCode SetAccelerometerParameters(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
|
|
||||||
_accelerometerParams = new HidAccelerometerParameters
|
_accelerometerParams = new HidAccelerometerParameters
|
||||||
{
|
{
|
||||||
@@ -454,7 +462,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// GetAccelerometerParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> float X, float Y
|
// GetAccelerometerParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> float X, float Y
|
||||||
public ResultCode GetAccelerometerParameters(ServiceCtx context)
|
public ResultCode GetAccelerometerParameters(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
context.ResponseData.Write(_accelerometerParams.X);
|
context.ResponseData.Write(_accelerometerParams.X);
|
||||||
@@ -469,7 +478,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// ResetAccelerometerParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
// ResetAccelerometerParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode ResetAccelerometerParameters(ServiceCtx context)
|
public ResultCode ResetAccelerometerParameters(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
_accelerometerParams.X = 0;
|
_accelerometerParams.X = 0;
|
||||||
@@ -484,9 +494,10 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// SetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, uint PlayMode, nn::applet::AppletResourceUserId)
|
// SetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, uint PlayMode, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode SetAccelerometerPlayMode(ServiceCtx context)
|
public ResultCode SetAccelerometerPlayMode(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
_accelerometerPlayMode = context.RequestData.ReadUInt32();
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
_accelerometerPlayMode = context.RequestData.ReadUInt32();
|
||||||
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _accelerometerPlayMode });
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _accelerometerPlayMode });
|
||||||
|
|
||||||
@@ -497,7 +508,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// GetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> uint PlayMode
|
// GetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> uint PlayMode
|
||||||
public ResultCode GetAccelerometerPlayMode(ServiceCtx context)
|
public ResultCode GetAccelerometerPlayMode(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
context.ResponseData.Write(_accelerometerPlayMode);
|
context.ResponseData.Write(_accelerometerPlayMode);
|
||||||
@@ -511,7 +523,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// ResetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
// ResetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode ResetAccelerometerPlayMode(ServiceCtx context)
|
public ResultCode ResetAccelerometerPlayMode(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
_accelerometerPlayMode = 0;
|
_accelerometerPlayMode = 0;
|
||||||
@@ -525,9 +538,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// SetGyroscopeZeroDriftMode(nn::hid::SixAxisSensorHandle, uint GyroscopeZeroDriftMode, nn::applet::AppletResourceUserId)
|
// SetGyroscopeZeroDriftMode(nn::hid::SixAxisSensorHandle, uint GyroscopeZeroDriftMode, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode SetGyroscopeZeroDriftMode(ServiceCtx context)
|
public ResultCode SetGyroscopeZeroDriftMode(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
_gyroscopeZeroDriftMode = (HidGyroscopeZeroDriftMode)context.RequestData.ReadInt32();
|
_gyroscopeZeroDriftMode = (HidGyroscopeZeroDriftMode)context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _gyroscopeZeroDriftMode });
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _gyroscopeZeroDriftMode });
|
||||||
|
|
||||||
@@ -538,7 +551,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// GetGyroscopeZeroDriftMode(nn::applet::AppletResourceUserId, nn::hid::SixAxisSensorHandle) -> int GyroscopeZeroDriftMode
|
// GetGyroscopeZeroDriftMode(nn::applet::AppletResourceUserId, nn::hid::SixAxisSensorHandle) -> int GyroscopeZeroDriftMode
|
||||||
public ResultCode GetGyroscopeZeroDriftMode(ServiceCtx context)
|
public ResultCode GetGyroscopeZeroDriftMode(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
context.ResponseData.Write((int)_gyroscopeZeroDriftMode);
|
context.ResponseData.Write((int)_gyroscopeZeroDriftMode);
|
||||||
@@ -552,7 +566,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// ResetGyroscopeZeroDriftMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
// ResetGyroscopeZeroDriftMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
||||||
public ResultCode ResetGyroscopeZeroDriftMode(ServiceCtx context)
|
public ResultCode ResetGyroscopeZeroDriftMode(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
_gyroscopeZeroDriftMode = HidGyroscopeZeroDriftMode.Standard;
|
_gyroscopeZeroDriftMode = HidGyroscopeZeroDriftMode.Standard;
|
||||||
@@ -566,7 +581,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// IsSixAxisSensorAtRest(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> bool IsAsRest
|
// IsSixAxisSensorAtRest(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> bool IsAsRest
|
||||||
public ResultCode IsSixAxisSensorAtRest(ServiceCtx context)
|
public ResultCode IsSixAxisSensorAtRest(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
bool isAtRest = true;
|
bool isAtRest = true;
|
||||||
@@ -582,8 +598,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
// IsFirmwareUpdateAvailableForSixAxisSensor(nn::hid::AppletResourceUserId, nn::hid::SixAxisSensorHandle, pid) -> bool UpdateAvailable
|
// IsFirmwareUpdateAvailableForSixAxisSensor(nn::hid::AppletResourceUserId, nn::hid::SixAxisSensorHandle, pid) -> bool UpdateAvailable
|
||||||
public ResultCode IsFirmwareUpdateAvailableForSixAxisSensor(ServiceCtx context)
|
public ResultCode IsFirmwareUpdateAvailableForSixAxisSensor(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
context.RequestData.BaseStream.Position += 4;
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
context.ResponseData.Write(_isFirmwareUpdateAvailableForSixAxisSensor);
|
context.ResponseData.Write(_isFirmwareUpdateAvailableForSixAxisSensor);
|
||||||
@@ -593,6 +609,64 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CommandHipc(84)] // 13.0.0+
|
||||||
|
// EnableSixAxisSensorUnalteredPassthrough(nn::applet::AppletResourceUserId, nn::hid::SixAxisSensorHandle, u8 enabled)
|
||||||
|
public ResultCode EnableSixAxisSensorUnalteredPassthrough(ServiceCtx context)
|
||||||
|
{
|
||||||
|
_isSixAxisSensorUnalteredPassthroughEnabled = context.RequestData.ReadUInt32() != 0;
|
||||||
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _isSixAxisSensorUnalteredPassthroughEnabled });
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CommandHipc(85)] // 13.0.0+
|
||||||
|
// IsSixAxisSensorUnalteredPassthroughEnabled(nn::applet::AppletResourceUserId, nn::hid::SixAxisSensorHandle) -> u8 enabled
|
||||||
|
public ResultCode IsSixAxisSensorUnalteredPassthroughEnabled(ServiceCtx context)
|
||||||
|
{
|
||||||
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
|
context.ResponseData.Write(_isSixAxisSensorUnalteredPassthroughEnabled);
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CommandHipc(87)] // 13.0.0+
|
||||||
|
// LoadSixAxisSensorCalibrationParameter(nn::applet::AppletResourceUserId, nn::hid::SixAxisSensorHandle, u64 unknown)
|
||||||
|
public ResultCode LoadSixAxisSensorCalibrationParameter(ServiceCtx context)
|
||||||
|
{
|
||||||
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
|
// TODO: CalibrationParameter have to be determined.
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CommandHipc(88)] // 13.0.0+
|
||||||
|
// GetSixAxisSensorIcInformation(nn::applet::AppletResourceUserId, nn::hid::SixAxisSensorHandle) -> u64 unknown
|
||||||
|
public ResultCode GetSixAxisSensorIcInformation(ServiceCtx context)
|
||||||
|
{
|
||||||
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
|
// TODO: IcInformation have to be determined.
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
[CommandHipc(91)]
|
[CommandHipc(91)]
|
||||||
// ActivateGesture(nn::applet::AppletResourceUserId, int Unknown0)
|
// ActivateGesture(nn::applet::AppletResourceUserId, int Unknown0)
|
||||||
public ResultCode ActivateGesture(ServiceCtx context)
|
public ResultCode ActivateGesture(ServiceCtx context)
|
||||||
@@ -606,16 +680,15 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
}
|
}
|
||||||
|
|
||||||
[CommandHipc(100)]
|
[CommandHipc(100)]
|
||||||
// SetSupportedNpadStyleSet(nn::applet::AppletResourceUserId, nn::hid::NpadStyleTag)
|
// SetSupportedNpadStyleSet(pid, nn::applet::AppletResourceUserId, nn::hid::NpadStyleTag)
|
||||||
public ResultCode SetSupportedNpadStyleSet(ServiceCtx context)
|
public ResultCode SetSupportedNpadStyleSet(ServiceCtx context)
|
||||||
{
|
{
|
||||||
|
ulong pid = context.Request.HandleDesc.PId;
|
||||||
ControllerType type = (ControllerType)context.RequestData.ReadInt32();
|
ControllerType type = (ControllerType)context.RequestData.ReadInt32();
|
||||||
|
context.RequestData.BaseStream.Position += 4; // Padding
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceHid, new {
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { pid, appletResourceUserId, type });
|
||||||
appletResourceUserId,
|
|
||||||
type
|
|
||||||
});
|
|
||||||
|
|
||||||
context.Device.Hid.Npads.SupportedStyleSets = type;
|
context.Device.Hid.Npads.SupportedStyleSets = type;
|
||||||
|
|
||||||
@@ -623,17 +696,15 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
}
|
}
|
||||||
|
|
||||||
[CommandHipc(101)]
|
[CommandHipc(101)]
|
||||||
// GetSupportedNpadStyleSet(nn::applet::AppletResourceUserId) -> uint nn::hid::NpadStyleTag
|
// GetSupportedNpadStyleSet(pid, nn::applet::AppletResourceUserId) -> uint nn::hid::NpadStyleTag
|
||||||
public ResultCode GetSupportedNpadStyleSet(ServiceCtx context)
|
public ResultCode GetSupportedNpadStyleSet(ServiceCtx context)
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
ulong pid = context.Request.HandleDesc.PId;
|
||||||
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
context.ResponseData.Write((int)context.Device.Hid.Npads.SupportedStyleSets);
|
context.ResponseData.Write((int)context.Device.Hid.Npads.SupportedStyleSets);
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceHid, new {
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, context.Device.Hid.Npads.SupportedStyleSets });
|
||||||
appletResourceUserId,
|
|
||||||
context.Device.Hid.Npads.SupportedStyleSets
|
|
||||||
});
|
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
@@ -658,7 +729,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceHid, $"{supportedPlayerIds.Length} " + string.Join(",", supportedPlayerIds.ToArray()));
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, $"{supportedPlayerIds.Length} Players: " + string.Join(",", supportedPlayerIds.ToArray()));
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
@@ -117,7 +117,7 @@ namespace Ryujinx.HLE.HOS.Services
|
|||||||
|
|
||||||
if (serviceExists)
|
if (serviceExists)
|
||||||
{
|
{
|
||||||
Logger.Debug?.Print(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Name}");
|
Logger.Trace?.Print(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Name}");
|
||||||
|
|
||||||
result = (ResultCode)processRequest.Invoke(service, new object[] { context });
|
result = (ResultCode)processRequest.Invoke(service, new object[] { context });
|
||||||
}
|
}
|
||||||
|
63
Ryujinx.HLE/HOS/Services/Mnpp/IServiceForApplication.cs
Normal file
63
Ryujinx.HLE/HOS/Services/Mnpp/IServiceForApplication.cs
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
using Ryujinx.Common;
|
||||||
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.Cpu;
|
||||||
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||||
|
|
||||||
|
namespace Ryujinx.HLE.HOS.Services.Mnpp
|
||||||
|
{
|
||||||
|
[Service("mnpp:app")] // 13.0.0+
|
||||||
|
class IServiceForApplication : IpcService
|
||||||
|
{
|
||||||
|
public IServiceForApplication(ServiceCtx context) { }
|
||||||
|
|
||||||
|
[CommandHipc(0)]
|
||||||
|
// Initialize(pid)
|
||||||
|
public ResultCode Initialize(ServiceCtx context)
|
||||||
|
{
|
||||||
|
// Pid placeholder
|
||||||
|
context.RequestData.ReadInt64();
|
||||||
|
ulong pid = context.Request.HandleDesc.PId;
|
||||||
|
|
||||||
|
// TODO: Service calls set:sys GetPlatformRegion.
|
||||||
|
// If the result == 1 (China) it calls arp:r GetApplicationInstanceId and GetApplicationLaunchProperty to get the title id and store it internally.
|
||||||
|
// If not, it does nothing.
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceMnpp, new { pid });
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CommandHipc(1)]
|
||||||
|
// SendRawTelemetryData(nn::account::Uid user_id, buffer<bytes, 5> title_id)
|
||||||
|
public ResultCode SendRawTelemetryData(ServiceCtx context)
|
||||||
|
{
|
||||||
|
ulong titleIdInputPosition = context.Request.SendBuff[0].Position;
|
||||||
|
ulong titleIdInputSize = context.Request.SendBuff[0].Size;
|
||||||
|
|
||||||
|
UserId userId = context.RequestData.ReadStruct<UserId>();
|
||||||
|
|
||||||
|
// TODO: Service calls set:sys GetPlatformRegion.
|
||||||
|
// If the result != 1 (China) it returns ResultCode.Success.
|
||||||
|
|
||||||
|
if (userId.IsNull)
|
||||||
|
{
|
||||||
|
return ResultCode.InvalidArgument;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (titleIdInputSize <= 64)
|
||||||
|
{
|
||||||
|
string titleId = MemoryHelper.ReadAsciiString(context.Memory, titleIdInputPosition, (long)titleIdInputSize);
|
||||||
|
|
||||||
|
// TODO: The service stores the titleId internally and seems proceed to some telemetry for China, which is not needed here.
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceMnpp, new { userId, titleId });
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceMnpp, new { userId });
|
||||||
|
|
||||||
|
return ResultCode.InvalidBufferSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
Ryujinx.HLE/HOS/Services/Mnpp/ResultCode.cs
Normal file
13
Ryujinx.HLE/HOS/Services/Mnpp/ResultCode.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
namespace Ryujinx.HLE.HOS.Services.Mnpp
|
||||||
|
{
|
||||||
|
enum ResultCode
|
||||||
|
{
|
||||||
|
ModuleId = 239,
|
||||||
|
ErrorCodeShift = 9,
|
||||||
|
|
||||||
|
Success = 0,
|
||||||
|
|
||||||
|
InvalidArgument = (100 << ErrorCodeShift) | ModuleId,
|
||||||
|
InvalidBufferSize = (101 << ErrorCodeShift) | ModuleId
|
||||||
|
}
|
||||||
|
}
|
@@ -135,6 +135,9 @@ namespace Ryujinx.Headless.SDL2
|
|||||||
[Option("enable-error-logs", Required = false, Default = true, HelpText = "Enables printing error log messages.")]
|
[Option("enable-error-logs", Required = false, Default = true, HelpText = "Enables printing error log messages.")]
|
||||||
public bool? LoggingEnableError { get; set; }
|
public bool? LoggingEnableError { get; set; }
|
||||||
|
|
||||||
|
[Option("enable-trace-logs", Required = false, Default = false, HelpText = "Enables printing trace log messages.")]
|
||||||
|
public bool? LoggingEnableTrace { get; set; }
|
||||||
|
|
||||||
[Option("enable-guest-logs", Required = false, Default = true, HelpText = "Enables printing guest log messages.")]
|
[Option("enable-guest-logs", Required = false, Default = true, HelpText = "Enables printing guest log messages.")]
|
||||||
public bool? LoggingEnableGuest { get; set; }
|
public bool? LoggingEnableGuest { get; set; }
|
||||||
|
|
||||||
|
@@ -389,6 +389,7 @@ namespace Ryujinx.Headless.SDL2
|
|||||||
Logger.SetEnable(LogLevel.Info, (bool)option.LoggingEnableInfo);
|
Logger.SetEnable(LogLevel.Info, (bool)option.LoggingEnableInfo);
|
||||||
Logger.SetEnable(LogLevel.Warning, (bool)option.LoggingEnableWarning);
|
Logger.SetEnable(LogLevel.Warning, (bool)option.LoggingEnableWarning);
|
||||||
Logger.SetEnable(LogLevel.Error, (bool)option.LoggingEnableError);
|
Logger.SetEnable(LogLevel.Error, (bool)option.LoggingEnableError);
|
||||||
|
Logger.SetEnable(LogLevel.Trace, (bool)option.LoggingEnableTrace);
|
||||||
Logger.SetEnable(LogLevel.Guest, (bool)option.LoggingEnableGuest);
|
Logger.SetEnable(LogLevel.Guest, (bool)option.LoggingEnableGuest);
|
||||||
Logger.SetEnable(LogLevel.AccessLog, (bool)option.LoggingEnableFsAccessLog);
|
Logger.SetEnable(LogLevel.AccessLog, (bool)option.LoggingEnableFsAccessLog);
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ namespace Ryujinx.Configuration
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current version of the file format
|
/// The current version of the file format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int CurrentVersion = 35;
|
public const int CurrentVersion = 36;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the configuration file format
|
/// Version of the configuration file format
|
||||||
@@ -81,6 +81,11 @@ namespace Ryujinx.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool LoggingEnableError { get; set; }
|
public bool LoggingEnableError { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enables printing trace log messages
|
||||||
|
/// </summary>
|
||||||
|
public bool LoggingEnableTrace { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables printing guest log messages
|
/// Enables printing guest log messages
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@@ -129,6 +129,11 @@ namespace Ryujinx.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ReactiveObject<bool> EnableError { get; private set; }
|
public ReactiveObject<bool> EnableError { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enables printing trace log messages
|
||||||
|
/// </summary>
|
||||||
|
public ReactiveObject<bool> EnableTrace { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables printing guest log messages
|
/// Enables printing guest log messages
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -161,6 +166,7 @@ namespace Ryujinx.Configuration
|
|||||||
EnableInfo = new ReactiveObject<bool>();
|
EnableInfo = new ReactiveObject<bool>();
|
||||||
EnableWarn = new ReactiveObject<bool>();
|
EnableWarn = new ReactiveObject<bool>();
|
||||||
EnableError = new ReactiveObject<bool>();
|
EnableError = new ReactiveObject<bool>();
|
||||||
|
EnableTrace = new ReactiveObject<bool>();
|
||||||
EnableGuest = new ReactiveObject<bool>();
|
EnableGuest = new ReactiveObject<bool>();
|
||||||
EnableFsAccessLog = new ReactiveObject<bool>();
|
EnableFsAccessLog = new ReactiveObject<bool>();
|
||||||
FilteredClasses = new ReactiveObject<LogClass[]>();
|
FilteredClasses = new ReactiveObject<LogClass[]>();
|
||||||
@@ -455,6 +461,7 @@ namespace Ryujinx.Configuration
|
|||||||
LoggingEnableInfo = Logger.EnableInfo,
|
LoggingEnableInfo = Logger.EnableInfo,
|
||||||
LoggingEnableWarn = Logger.EnableWarn,
|
LoggingEnableWarn = Logger.EnableWarn,
|
||||||
LoggingEnableError = Logger.EnableError,
|
LoggingEnableError = Logger.EnableError,
|
||||||
|
LoggingEnableTrace = Logger.EnableTrace,
|
||||||
LoggingEnableGuest = Logger.EnableGuest,
|
LoggingEnableGuest = Logger.EnableGuest,
|
||||||
LoggingEnableFsAccessLog = Logger.EnableFsAccessLog,
|
LoggingEnableFsAccessLog = Logger.EnableFsAccessLog,
|
||||||
LoggingFilteredClasses = Logger.FilteredClasses,
|
LoggingFilteredClasses = Logger.FilteredClasses,
|
||||||
@@ -526,6 +533,7 @@ namespace Ryujinx.Configuration
|
|||||||
Logger.EnableInfo.Value = true;
|
Logger.EnableInfo.Value = true;
|
||||||
Logger.EnableWarn.Value = true;
|
Logger.EnableWarn.Value = true;
|
||||||
Logger.EnableError.Value = true;
|
Logger.EnableError.Value = true;
|
||||||
|
Logger.EnableTrace.Value = false;
|
||||||
Logger.EnableGuest.Value = true;
|
Logger.EnableGuest.Value = true;
|
||||||
Logger.EnableFsAccessLog.Value = false;
|
Logger.EnableFsAccessLog.Value = false;
|
||||||
Logger.FilteredClasses.Value = Array.Empty<LogClass>();
|
Logger.FilteredClasses.Value = Array.Empty<LogClass>();
|
||||||
@@ -990,6 +998,15 @@ namespace Ryujinx.Configuration
|
|||||||
|
|
||||||
configurationFileUpdated = true;
|
configurationFileUpdated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (configurationFileFormat.Version < 36)
|
||||||
|
{
|
||||||
|
Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 36.");
|
||||||
|
|
||||||
|
configurationFileFormat.LoggingEnableTrace = false;
|
||||||
|
|
||||||
|
configurationFileUpdated = true;
|
||||||
|
}
|
||||||
|
|
||||||
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
|
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
|
||||||
Graphics.BackendThreading.Value = configurationFileFormat.BackendThreading;
|
Graphics.BackendThreading.Value = configurationFileFormat.BackendThreading;
|
||||||
@@ -1003,6 +1020,7 @@ namespace Ryujinx.Configuration
|
|||||||
Logger.EnableInfo.Value = configurationFileFormat.LoggingEnableInfo;
|
Logger.EnableInfo.Value = configurationFileFormat.LoggingEnableInfo;
|
||||||
Logger.EnableWarn.Value = configurationFileFormat.LoggingEnableWarn;
|
Logger.EnableWarn.Value = configurationFileFormat.LoggingEnableWarn;
|
||||||
Logger.EnableError.Value = configurationFileFormat.LoggingEnableError;
|
Logger.EnableError.Value = configurationFileFormat.LoggingEnableError;
|
||||||
|
Logger.EnableTrace.Value = configurationFileFormat.LoggingEnableTrace;
|
||||||
Logger.EnableGuest.Value = configurationFileFormat.LoggingEnableGuest;
|
Logger.EnableGuest.Value = configurationFileFormat.LoggingEnableGuest;
|
||||||
Logger.EnableFsAccessLog.Value = configurationFileFormat.LoggingEnableFsAccessLog;
|
Logger.EnableFsAccessLog.Value = configurationFileFormat.LoggingEnableFsAccessLog;
|
||||||
Logger.FilteredClasses.Value = configurationFileFormat.LoggingFilteredClasses;
|
Logger.FilteredClasses.Value = configurationFileFormat.LoggingFilteredClasses;
|
||||||
|
@@ -13,6 +13,7 @@ namespace Ryujinx.Configuration
|
|||||||
ConfigurationState.Instance.Logger.EnableInfo.Event += ReloadEnableInfo;
|
ConfigurationState.Instance.Logger.EnableInfo.Event += ReloadEnableInfo;
|
||||||
ConfigurationState.Instance.Logger.EnableWarn.Event += ReloadEnableWarning;
|
ConfigurationState.Instance.Logger.EnableWarn.Event += ReloadEnableWarning;
|
||||||
ConfigurationState.Instance.Logger.EnableError.Event += ReloadEnableError;
|
ConfigurationState.Instance.Logger.EnableError.Event += ReloadEnableError;
|
||||||
|
ConfigurationState.Instance.Logger.EnableTrace.Event += ReloadEnableTrace;
|
||||||
ConfigurationState.Instance.Logger.EnableGuest.Event += ReloadEnableGuest;
|
ConfigurationState.Instance.Logger.EnableGuest.Event += ReloadEnableGuest;
|
||||||
ConfigurationState.Instance.Logger.EnableFsAccessLog.Event += ReloadEnableFsAccessLog;
|
ConfigurationState.Instance.Logger.EnableFsAccessLog.Event += ReloadEnableFsAccessLog;
|
||||||
ConfigurationState.Instance.Logger.FilteredClasses.Event += ReloadFilteredClasses;
|
ConfigurationState.Instance.Logger.FilteredClasses.Event += ReloadFilteredClasses;
|
||||||
@@ -44,6 +45,11 @@ namespace Ryujinx.Configuration
|
|||||||
Logger.SetEnable(LogLevel.Error, e.NewValue);
|
Logger.SetEnable(LogLevel.Error, e.NewValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void ReloadEnableTrace(object sender, ReactiveEventArgs<bool> e)
|
||||||
|
{
|
||||||
|
Logger.SetEnable(LogLevel.Trace, e.NewValue);
|
||||||
|
}
|
||||||
|
|
||||||
private static void ReloadEnableGuest(object sender, ReactiveEventArgs<bool> e)
|
private static void ReloadEnableGuest(object sender, ReactiveEventArgs<bool> e)
|
||||||
{
|
{
|
||||||
Logger.SetEnable(LogLevel.Guest, e.NewValue);
|
Logger.SetEnable(LogLevel.Guest, e.NewValue);
|
||||||
|
@@ -638,18 +638,18 @@ namespace Ryujinx.Ui
|
|||||||
[Conditional("RELEASE")]
|
[Conditional("RELEASE")]
|
||||||
public void PerformanceCheck()
|
public void PerformanceCheck()
|
||||||
{
|
{
|
||||||
if (ConfigurationState.Instance.Logger.EnableDebug.Value)
|
if (ConfigurationState.Instance.Logger.EnableTrace.Value)
|
||||||
{
|
{
|
||||||
MessageDialog debugWarningDialog = new MessageDialog(this, DialogFlags.Modal, MessageType.Warning, ButtonsType.YesNo, null)
|
MessageDialog debugWarningDialog = new MessageDialog(this, DialogFlags.Modal, MessageType.Warning, ButtonsType.YesNo, null)
|
||||||
{
|
{
|
||||||
Title = "Ryujinx - Warning",
|
Title = "Ryujinx - Warning",
|
||||||
Text = "You have debug logging enabled, which is designed to be used by developers only.",
|
Text = "You have trace logging enabled, which is designed to be used by developers only.",
|
||||||
SecondaryText = "For optimal performance, it's recommended to disable debug logging. Would you like to disable debug logging now?"
|
SecondaryText = "For optimal performance, it's recommended to disable trace logging. Would you like to disable trace logging now?"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (debugWarningDialog.Run() == (int)ResponseType.Yes)
|
if (debugWarningDialog.Run() == (int)ResponseType.Yes)
|
||||||
{
|
{
|
||||||
ConfigurationState.Instance.Logger.EnableDebug.Value = false;
|
ConfigurationState.Instance.Logger.EnableTrace.Value = false;
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -35,6 +35,7 @@ namespace Ryujinx.Ui.Windows
|
|||||||
private float _previousVolumeLevel;
|
private float _previousVolumeLevel;
|
||||||
|
|
||||||
#pragma warning disable CS0649, IDE0044
|
#pragma warning disable CS0649, IDE0044
|
||||||
|
[GUI] CheckButton _traceLogToggle;
|
||||||
[GUI] CheckButton _errorLogToggle;
|
[GUI] CheckButton _errorLogToggle;
|
||||||
[GUI] CheckButton _warningLogToggle;
|
[GUI] CheckButton _warningLogToggle;
|
||||||
[GUI] CheckButton _infoLogToggle;
|
[GUI] CheckButton _infoLogToggle;
|
||||||
@@ -141,6 +142,11 @@ namespace Ryujinx.Ui.Windows
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Setup Currents.
|
// Setup Currents.
|
||||||
|
if (ConfigurationState.Instance.Logger.EnableTrace)
|
||||||
|
{
|
||||||
|
_traceLogToggle.Click();
|
||||||
|
}
|
||||||
|
|
||||||
if (ConfigurationState.Instance.Logger.EnableFileLog)
|
if (ConfigurationState.Instance.Logger.EnableFileLog)
|
||||||
{
|
{
|
||||||
_fileLogToggle.Click();
|
_fileLogToggle.Click();
|
||||||
@@ -487,6 +493,7 @@ namespace Ryujinx.Ui.Windows
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConfigurationState.Instance.Logger.EnableError.Value = _errorLogToggle.Active;
|
ConfigurationState.Instance.Logger.EnableError.Value = _errorLogToggle.Active;
|
||||||
|
ConfigurationState.Instance.Logger.EnableTrace.Value = _traceLogToggle.Active;
|
||||||
ConfigurationState.Instance.Logger.EnableWarn.Value = _warningLogToggle.Active;
|
ConfigurationState.Instance.Logger.EnableWarn.Value = _warningLogToggle.Active;
|
||||||
ConfigurationState.Instance.Logger.EnableInfo.Value = _infoLogToggle.Active;
|
ConfigurationState.Instance.Logger.EnableInfo.Value = _infoLogToggle.Active;
|
||||||
ConfigurationState.Instance.Logger.EnableStub.Value = _stubLogToggle.Active;
|
ConfigurationState.Instance.Logger.EnableStub.Value = _stubLogToggle.Active;
|
||||||
|
@@ -2572,6 +2572,24 @@
|
|||||||
<property name="position">21</property>
|
<property name="position">21</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="_traceLogToggle">
|
||||||
|
<property name="label" translatable="yes">Enable Trace Logs</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="tooltip-text" translatable="yes">Enables printing trace log messages</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="margin-top">5</property>
|
||||||
|
<property name="margin-bottom">5</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">22</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
Reference in New Issue
Block a user