forked from Mirror/Ryujinx
Refactor Ryujinx.Common and HLE Stub Logging (#537)
* Refactor Ryujinx.Common and HLE Stub Logging * Resolve review comments * Rename missed loop variable * Optimize PrintStub logging function * Pass the call-sites Thread ID through to the logger * Remove superfluous lock from ConsoleLog * Process logged data objects in the logger target Pass the data object all the way to the output logger targets, to allow them to "serialize" this in whatever appropriate format they're logging in. * Use existing StringBuilder to build the properties string * Add a ServiceNotImplemented Exception Useful for printing debug information about unimplemented service calls * Resolve Style Nits * Resolve Merge Issues * Fix typo and align declarations
This commit is contained in:
parent
600799ba87
commit
8406ec6272
42 changed files with 696 additions and 478 deletions
|
@ -2,103 +2,103 @@ namespace Ryujinx.Common
|
||||||
{
|
{
|
||||||
public static class BitUtils
|
public static class BitUtils
|
||||||
{
|
{
|
||||||
public static int AlignUp(int Value, int Size)
|
|
||||||
{
|
|
||||||
return (Value + (Size - 1)) & -Size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ulong AlignUp(ulong Value, int Size)
|
|
||||||
{
|
|
||||||
return (ulong)AlignUp((long)Value, Size);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long AlignUp(long Value, int Size)
|
|
||||||
{
|
|
||||||
return (Value + (Size - 1)) & -(long)Size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int AlignDown(int Value, int Size)
|
|
||||||
{
|
|
||||||
return Value & -Size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ulong AlignDown(ulong Value, int Size)
|
|
||||||
{
|
|
||||||
return (ulong)AlignDown((long)Value, Size);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long AlignDown(long Value, int Size)
|
|
||||||
{
|
|
||||||
return Value & -(long)Size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ulong DivRoundUp(ulong Value, uint Dividend)
|
|
||||||
{
|
|
||||||
return (Value + Dividend - 1) / Dividend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long DivRoundUp(long Value, int Dividend)
|
|
||||||
{
|
|
||||||
return (Value + Dividend - 1) / Dividend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsPowerOfTwo32(int Value)
|
|
||||||
{
|
|
||||||
return Value != 0 && (Value & (Value - 1)) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsPowerOfTwo64(long Value)
|
|
||||||
{
|
|
||||||
return Value != 0 && (Value & (Value - 1)) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int CountLeadingZeros32(int Value)
|
|
||||||
{
|
|
||||||
return (int)CountLeadingZeros((ulong)Value, 32);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int CountLeadingZeros64(long Value)
|
|
||||||
{
|
|
||||||
return (int)CountLeadingZeros((ulong)Value, 64);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static readonly byte[] ClzNibbleTbl = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
|
private static readonly byte[] ClzNibbleTbl = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
private static ulong CountLeadingZeros(ulong Value, int Size) // Size is 8, 16, 32 or 64 (SIMD&FP or Base Inst.).
|
public static int AlignUp(int value, int size)
|
||||||
{
|
{
|
||||||
if (Value == 0ul)
|
return (value + (size - 1)) & -size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ulong AlignUp(ulong value, int size)
|
||||||
|
{
|
||||||
|
return (ulong)AlignUp((long)value, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long AlignUp(long value, int size)
|
||||||
|
{
|
||||||
|
return (value + (size - 1)) & -(long)size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int AlignDown(int value, int size)
|
||||||
|
{
|
||||||
|
return value & -size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ulong AlignDown(ulong value, int size)
|
||||||
|
{
|
||||||
|
return (ulong)AlignDown((long)value, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long AlignDown(long value, int size)
|
||||||
|
{
|
||||||
|
return value & -(long)size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ulong DivRoundUp(ulong value, uint dividend)
|
||||||
|
{
|
||||||
|
return (value + dividend - 1) / dividend;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long DivRoundUp(long value, int dividend)
|
||||||
|
{
|
||||||
|
return (value + dividend - 1) / dividend;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsPowerOfTwo32(int value)
|
||||||
|
{
|
||||||
|
return value != 0 && (value & (value - 1)) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsPowerOfTwo64(long value)
|
||||||
|
{
|
||||||
|
return value != 0 && (value & (value - 1)) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int CountLeadingZeros32(int value)
|
||||||
|
{
|
||||||
|
return (int)CountLeadingZeros((ulong)value, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int CountLeadingZeros64(long value)
|
||||||
|
{
|
||||||
|
return (int)CountLeadingZeros((ulong)value, 64);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ulong CountLeadingZeros(ulong value, int size)
|
||||||
|
{
|
||||||
|
if (value == 0ul)
|
||||||
{
|
{
|
||||||
return (ulong)Size;
|
return (ulong)size;
|
||||||
}
|
}
|
||||||
|
|
||||||
int NibbleIdx = Size;
|
int nibbleIdx = size;
|
||||||
int PreCount, Count = 0;
|
int preCount, count = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
NibbleIdx -= 4;
|
nibbleIdx -= 4;
|
||||||
PreCount = ClzNibbleTbl[(Value >> NibbleIdx) & 0b1111];
|
preCount = ClzNibbleTbl[(value >> nibbleIdx) & 0b1111];
|
||||||
Count += PreCount;
|
count += preCount;
|
||||||
}
|
}
|
||||||
while (PreCount == 4);
|
while (preCount == 4);
|
||||||
|
|
||||||
return (ulong)Count;
|
return (ulong)count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long ReverseBits64(long Value)
|
public static long ReverseBits64(long value)
|
||||||
{
|
{
|
||||||
return (long)ReverseBits64((ulong)Value);
|
return (long)ReverseBits64((ulong)value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ulong ReverseBits64(ulong Value)
|
private static ulong ReverseBits64(ulong value)
|
||||||
{
|
{
|
||||||
Value = ((Value & 0xaaaaaaaaaaaaaaaa) >> 1 ) | ((Value & 0x5555555555555555) << 1 );
|
value = ((value & 0xaaaaaaaaaaaaaaaa) >> 1 ) | ((value & 0x5555555555555555) << 1 );
|
||||||
Value = ((Value & 0xcccccccccccccccc) >> 2 ) | ((Value & 0x3333333333333333) << 2 );
|
value = ((value & 0xcccccccccccccccc) >> 2 ) | ((value & 0x3333333333333333) << 2 );
|
||||||
Value = ((Value & 0xf0f0f0f0f0f0f0f0) >> 4 ) | ((Value & 0x0f0f0f0f0f0f0f0f) << 4 );
|
value = ((value & 0xf0f0f0f0f0f0f0f0) >> 4 ) | ((value & 0x0f0f0f0f0f0f0f0f) << 4 );
|
||||||
Value = ((Value & 0xff00ff00ff00ff00) >> 8 ) | ((Value & 0x00ff00ff00ff00ff) << 8 );
|
value = ((value & 0xff00ff00ff00ff00) >> 8 ) | ((value & 0x00ff00ff00ff00ff) << 8 );
|
||||||
Value = ((Value & 0xffff0000ffff0000) >> 16) | ((Value & 0x0000ffff0000ffff) << 16);
|
value = ((value & 0xffff0000ffff0000) >> 16) | ((value & 0x0000ffff0000ffff) << 16);
|
||||||
|
|
||||||
return (Value >> 32) | (Value << 32);
|
return (value >> 32) | (value << 32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
90
Ryujinx.Common/HexUtils.cs
Normal file
90
Ryujinx.Common/HexUtils.cs
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Ryujinx.Common
|
||||||
|
{
|
||||||
|
public static class HexUtils
|
||||||
|
{
|
||||||
|
private static readonly char[] HexChars = "0123456789ABCDEF".ToCharArray();
|
||||||
|
|
||||||
|
private const int HexTableColumnWidth = 8;
|
||||||
|
private const int HexTableColumnSpace = 3;
|
||||||
|
|
||||||
|
// Modified for Ryujinx
|
||||||
|
// Original by Pascal Ganaye - CPOL License
|
||||||
|
// https://www.codeproject.com/Articles/36747/Quick-and-Dirty-HexDump-of-a-Byte-Array
|
||||||
|
public static string HexTable(byte[] bytes, int bytesPerLine = 16)
|
||||||
|
{
|
||||||
|
if (bytes == null)
|
||||||
|
{
|
||||||
|
return "<null>";
|
||||||
|
}
|
||||||
|
|
||||||
|
int bytesLength = bytes.Length;
|
||||||
|
|
||||||
|
int firstHexColumn =
|
||||||
|
HexTableColumnWidth
|
||||||
|
+ HexTableColumnSpace;
|
||||||
|
|
||||||
|
int firstCharColumn = firstHexColumn
|
||||||
|
+ bytesPerLine * HexTableColumnSpace
|
||||||
|
+ (bytesPerLine - 1) / HexTableColumnWidth
|
||||||
|
+ 2;
|
||||||
|
|
||||||
|
int lineLength = firstCharColumn
|
||||||
|
+ bytesPerLine
|
||||||
|
+ Environment.NewLine.Length;
|
||||||
|
|
||||||
|
char[] line = (new String(' ', lineLength - Environment.NewLine.Length) + Environment.NewLine).ToCharArray();
|
||||||
|
|
||||||
|
int expectedLines = (bytesLength + bytesPerLine - 1) / bytesPerLine;
|
||||||
|
|
||||||
|
StringBuilder result = new StringBuilder(expectedLines * lineLength);
|
||||||
|
|
||||||
|
for (int i = 0; i < bytesLength; i += bytesPerLine)
|
||||||
|
{
|
||||||
|
line[0] = HexChars[(i >> 28) & 0xF];
|
||||||
|
line[1] = HexChars[(i >> 24) & 0xF];
|
||||||
|
line[2] = HexChars[(i >> 20) & 0xF];
|
||||||
|
line[3] = HexChars[(i >> 16) & 0xF];
|
||||||
|
line[4] = HexChars[(i >> 12) & 0xF];
|
||||||
|
line[5] = HexChars[(i >> 8) & 0xF];
|
||||||
|
line[6] = HexChars[(i >> 4) & 0xF];
|
||||||
|
line[7] = HexChars[(i >> 0) & 0xF];
|
||||||
|
|
||||||
|
int hexColumn = firstHexColumn;
|
||||||
|
int charColumn = firstCharColumn;
|
||||||
|
|
||||||
|
for (int j = 0; j < bytesPerLine; j++)
|
||||||
|
{
|
||||||
|
if (j > 0 && (j & 7) == 0)
|
||||||
|
{
|
||||||
|
hexColumn++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i + j >= bytesLength)
|
||||||
|
{
|
||||||
|
line[hexColumn] = ' ';
|
||||||
|
line[hexColumn + 1] = ' ';
|
||||||
|
line[charColumn] = ' ';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
byte b = bytes[i + j];
|
||||||
|
|
||||||
|
line[hexColumn] = HexChars[(b >> 4) & 0xF];
|
||||||
|
line[hexColumn + 1] = HexChars[b & 0xF];
|
||||||
|
line[charColumn] = (b < 32 ? '·' : (char)b);
|
||||||
|
}
|
||||||
|
|
||||||
|
hexColumn += 3;
|
||||||
|
charColumn++;
|
||||||
|
}
|
||||||
|
|
||||||
|
result.Append(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,16 +4,28 @@ namespace Ryujinx.Common.Logging
|
||||||
{
|
{
|
||||||
public class LogEventArgs : EventArgs
|
public class LogEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public LogLevel Level { get; private set; }
|
public LogLevel Level { get; private set; }
|
||||||
public TimeSpan Time { get; private set; }
|
public TimeSpan Time { get; private set; }
|
||||||
|
public int ThreadId { get; private set; }
|
||||||
|
|
||||||
public string Message { get; private set; }
|
public string Message { get; private set; }
|
||||||
|
public object Data { get; private set; }
|
||||||
|
|
||||||
public LogEventArgs(LogLevel Level, TimeSpan Time, string Message)
|
public LogEventArgs(LogLevel level, TimeSpan time, int threadId, string message)
|
||||||
{
|
{
|
||||||
this.Level = Level;
|
this.Level = level;
|
||||||
this.Time = Time;
|
this.Time = time;
|
||||||
this.Message = Message;
|
this.ThreadId = threadId;
|
||||||
|
this.Message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LogEventArgs(LogLevel level, TimeSpan time, int threadId, string message, object data)
|
||||||
|
{
|
||||||
|
this.Level = level;
|
||||||
|
this.Time = time;
|
||||||
|
this.ThreadId = threadId;
|
||||||
|
this.Message = message;
|
||||||
|
this.Data = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,78 +1,97 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Ryujinx.Common.Logging
|
namespace Ryujinx.Common.Logging
|
||||||
{
|
{
|
||||||
public static class Logger
|
public static class Logger
|
||||||
{
|
{
|
||||||
private static bool[] EnabledLevels;
|
private static Stopwatch m_Time;
|
||||||
private static bool[] EnabledClasses;
|
|
||||||
|
private static readonly bool[] m_EnabledLevels;
|
||||||
|
private static readonly bool[] m_EnabledClasses;
|
||||||
|
|
||||||
public static event EventHandler<LogEventArgs> Updated;
|
public static event EventHandler<LogEventArgs> Updated;
|
||||||
|
|
||||||
private static Stopwatch Time;
|
|
||||||
|
|
||||||
static Logger()
|
static Logger()
|
||||||
{
|
{
|
||||||
EnabledLevels = new bool[Enum.GetNames(typeof(LogLevel)).Length];
|
m_EnabledLevels = new bool[Enum.GetNames(typeof(LogLevel)).Length];
|
||||||
EnabledClasses = new bool[Enum.GetNames(typeof(LogClass)).Length];
|
m_EnabledClasses = new bool[Enum.GetNames(typeof(LogClass)).Length];
|
||||||
|
|
||||||
EnabledLevels[(int)LogLevel.Stub] = true;
|
m_EnabledLevels[(int)LogLevel.Stub] = true;
|
||||||
EnabledLevels[(int)LogLevel.Info] = true;
|
m_EnabledLevels[(int)LogLevel.Info] = true;
|
||||||
EnabledLevels[(int)LogLevel.Warning] = true;
|
m_EnabledLevels[(int)LogLevel.Warning] = true;
|
||||||
EnabledLevels[(int)LogLevel.Error] = true;
|
m_EnabledLevels[(int)LogLevel.Error] = true;
|
||||||
|
|
||||||
for (int Index = 0; Index < EnabledClasses.Length; Index++)
|
for (int index = 0; index < m_EnabledClasses.Length; index++)
|
||||||
{
|
{
|
||||||
EnabledClasses[Index] = true;
|
m_EnabledClasses[index] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Time = new Stopwatch();
|
m_Time = Stopwatch.StartNew();
|
||||||
|
|
||||||
Time.Start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetEnable(LogLevel Level, bool Enabled)
|
public static void SetEnable(LogLevel logLevel, bool enabled)
|
||||||
{
|
{
|
||||||
EnabledLevels[(int)Level] = Enabled;
|
m_EnabledLevels[(int)logLevel] = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetEnable(LogClass Class, bool Enabled)
|
public static void SetEnable(LogClass logClass, bool enabled)
|
||||||
{
|
{
|
||||||
EnabledClasses[(int)Class] = Enabled;
|
m_EnabledClasses[(int)logClass] = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PrintDebug(LogClass Class, string Message, [CallerMemberName] string Caller = "")
|
public static void PrintDebug(LogClass logClass, string message, [CallerMemberName] string caller = "")
|
||||||
{
|
{
|
||||||
Print(LogLevel.Debug, Class, GetFormattedMessage(Class, Message, Caller));
|
Print(LogLevel.Debug, logClass, GetFormattedMessage(logClass, message, caller));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PrintStub(LogClass Class, string Message, [CallerMemberName] string Caller = "")
|
public static void PrintInfo(LogClass logClass, string message, [CallerMemberName] string Caller = "")
|
||||||
{
|
{
|
||||||
Print(LogLevel.Stub, Class, GetFormattedMessage(Class, Message, Caller));
|
Print(LogLevel.Info, logClass, GetFormattedMessage(logClass, message, Caller));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PrintInfo(LogClass Class, string Message, [CallerMemberName] string Caller = "")
|
public static void PrintWarning(LogClass logClass, string message, [CallerMemberName] string Caller = "")
|
||||||
{
|
{
|
||||||
Print(LogLevel.Info, Class, GetFormattedMessage(Class, Message, Caller));
|
Print(LogLevel.Warning, logClass, GetFormattedMessage(logClass, message, Caller));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PrintWarning(LogClass Class, string Message, [CallerMemberName] string Caller = "")
|
public static void PrintError(LogClass logClass, string message, [CallerMemberName] string Caller = "")
|
||||||
{
|
{
|
||||||
Print(LogLevel.Warning, Class, GetFormattedMessage(Class, Message, Caller));
|
Print(LogLevel.Error, logClass, GetFormattedMessage(logClass, message, Caller));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void PrintError(LogClass Class, string Message, [CallerMemberName] string Caller = "")
|
public static void PrintStub(LogClass logClass, string message = "", [CallerMemberName] string caller = "")
|
||||||
{
|
{
|
||||||
Print(LogLevel.Error, Class, GetFormattedMessage(Class, Message, Caller));
|
Print(LogLevel.Stub, logClass, GetFormattedMessage(logClass, "Stubbed. " + message, caller));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Print(LogLevel Level, LogClass Class, string Message)
|
public static void PrintStub<T>(LogClass logClass, T obj, [CallerMemberName] string caller = "")
|
||||||
{
|
{
|
||||||
if (EnabledLevels[(int)Level] && EnabledClasses[(int)Class])
|
Print(LogLevel.Stub, logClass, GetFormattedMessage(logClass, "Stubbed.", caller), obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PrintStub<T>(LogClass logClass, string message, T obj, [CallerMemberName] string caller = "")
|
||||||
|
{
|
||||||
|
Print(LogLevel.Stub, logClass, GetFormattedMessage(logClass, "Stubbed. " + message, caller), obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Print(LogLevel logLevel, LogClass logClass, string message)
|
||||||
|
{
|
||||||
|
if (m_EnabledLevels[(int)logLevel] && m_EnabledClasses[(int)logClass])
|
||||||
{
|
{
|
||||||
Updated?.Invoke(null, new LogEventArgs(Level, Time.Elapsed, Message));
|
Updated?.Invoke(null, new LogEventArgs(logLevel, m_Time.Elapsed, Thread.CurrentThread.ManagedThreadId, message));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Print(LogLevel logLevel, LogClass logClass, string message, object data)
|
||||||
|
{
|
||||||
|
if (m_EnabledLevels[(int)logLevel] && m_EnabledClasses[(int)logClass])
|
||||||
|
{
|
||||||
|
Updated?.Invoke(null, new LogEventArgs(logLevel, m_Time.Elapsed, Thread.CurrentThread.ManagedThreadId, message, data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
163
Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs
Normal file
163
Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs
Normal file
|
@ -0,0 +1,163 @@
|
||||||
|
using Ryujinx.Common;
|
||||||
|
using Ryujinx.HLE.HOS;
|
||||||
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
|
using Ryujinx.HLE.HOS.Kernel.Ipc;
|
||||||
|
using Ryujinx.HLE.HOS.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace Ryujinx.HLE.Exceptions
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
internal class ServiceNotImplementedException : Exception
|
||||||
|
{
|
||||||
|
public KSession Session { get; }
|
||||||
|
public IpcMessage Request { get; }
|
||||||
|
public ServiceCtx Context { get; }
|
||||||
|
|
||||||
|
public ServiceNotImplementedException(ServiceCtx context)
|
||||||
|
: this(context, "The service call is not implemented.")
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public ServiceNotImplementedException(ServiceCtx context, string message)
|
||||||
|
: base(message)
|
||||||
|
{
|
||||||
|
Context = context;
|
||||||
|
Session = context.Session;
|
||||||
|
Request = context.Request;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceNotImplementedException(ServiceCtx context, string message, Exception inner)
|
||||||
|
: base(message, inner)
|
||||||
|
{
|
||||||
|
Context = context;
|
||||||
|
Session = context.Session;
|
||||||
|
Request = context.Request;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ServiceNotImplementedException(SerializationInfo info, StreamingContext context)
|
||||||
|
: base(info, context)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public override string Message
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return base.Message +
|
||||||
|
Environment.NewLine +
|
||||||
|
Environment.NewLine +
|
||||||
|
BuildMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string BuildMessage()
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
// Print the IPC command details (service name, command ID, and handler)
|
||||||
|
(Type callingType, MethodBase callingMethod) = WalkStackTrace(new StackTrace(this));
|
||||||
|
|
||||||
|
if (callingType != null && callingMethod != null)
|
||||||
|
{
|
||||||
|
var ipcService = Context.Session.Service;
|
||||||
|
var ipcCommands = ipcService.Commands;
|
||||||
|
|
||||||
|
// Find the handler for the method called
|
||||||
|
var ipcHandler = ipcCommands.FirstOrDefault(x => x.Value.Method == callingMethod);
|
||||||
|
var ipcCommandId = ipcHandler.Key;
|
||||||
|
var ipcMethod = ipcHandler.Value;
|
||||||
|
|
||||||
|
if (ipcMethod != null)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"Service Command: {Session.ServiceName} {ipcService.GetType().Name}: {ipcCommandId} ({ipcMethod.Method.Name})");
|
||||||
|
sb.AppendLine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Print buffer information
|
||||||
|
sb.AppendLine("Buffer Information");
|
||||||
|
|
||||||
|
if (Request.PtrBuff.Count > 0)
|
||||||
|
{
|
||||||
|
sb.AppendLine("\tPtrBuff:");
|
||||||
|
|
||||||
|
foreach (var buff in Request.PtrBuff)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"\t[{buff.Index}] Position: 0x{buff.Position:x16} Size: 0x{buff.Size:x16}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Request.SendBuff.Count > 0)
|
||||||
|
{
|
||||||
|
sb.AppendLine("\tSendBuff:");
|
||||||
|
|
||||||
|
foreach (var buff in Request.SendBuff)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Request.ReceiveBuff.Count > 0)
|
||||||
|
{
|
||||||
|
sb.AppendLine("\tReceiveBuff:");
|
||||||
|
|
||||||
|
foreach (var buff in Request.ReceiveBuff)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Request.ExchangeBuff.Count > 0)
|
||||||
|
{
|
||||||
|
sb.AppendLine("\tExchangeBuff:");
|
||||||
|
|
||||||
|
foreach (var buff in Request.ExchangeBuff)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Request.RecvListBuff.Count > 0)
|
||||||
|
{
|
||||||
|
sb.AppendLine("\tRecvListBuff:");
|
||||||
|
|
||||||
|
foreach (var buff in Request.RecvListBuff)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
|
sb.AppendLine("Raw Request Data:");
|
||||||
|
sb.Append(HexUtils.HexTable(Request.RawData));
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private (Type, MethodBase) WalkStackTrace(StackTrace trace)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
StackFrame frame;
|
||||||
|
// Find the IIpcService method that threw this exception
|
||||||
|
while ((frame = trace.GetFrame(i++)) != null)
|
||||||
|
{
|
||||||
|
var method = frame.GetMethod();
|
||||||
|
var declType = method.DeclaringType;
|
||||||
|
|
||||||
|
if (typeof(IIpcService).IsAssignableFrom(declType))
|
||||||
|
{
|
||||||
|
return (declType, method);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (null, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -118,7 +118,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc
|
||||||
{
|
{
|
||||||
long unknown = context.RequestData.ReadInt64();
|
long unknown = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAcc, $"Stubbed. Unknown: {unknown}");
|
Logger.PrintStub(LogClass.ServiceAcc, new { unknown });
|
||||||
|
|
||||||
context.ResponseData.Write(false);
|
context.ResponseData.Write(false);
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc
|
||||||
{
|
{
|
||||||
bool unknown = context.RequestData.ReadBoolean();
|
bool unknown = context.RequestData.ReadBoolean();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAcc, $"Stubbed. Unknown: {unknown}");
|
Logger.PrintStub(LogClass.ServiceAcc, new { unknown });
|
||||||
|
|
||||||
UserProfile profile = context.Device.System.State.LastOpenUser;
|
UserProfile profile = context.Device.System.State.LastOpenUser;
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc
|
||||||
{
|
{
|
||||||
long unknown = context.RequestData.ReadInt64();
|
long unknown = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAcc, $"Stubbed. Unknown: {unknown}");
|
Logger.PrintStub(LogClass.ServiceAcc, new { unknown });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc
|
||||||
// CheckAvailability()
|
// CheckAvailability()
|
||||||
public long CheckAvailability(ServiceCtx context)
|
public long CheckAvailability(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAcc, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAcc);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc
|
||||||
{
|
{
|
||||||
long networkServiceAccountId = 0xcafe;
|
long networkServiceAccountId = 0xcafe;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAcc, $"Stubbed. NetworkServiceAccountId: {networkServiceAccountId}");
|
Logger.PrintStub(LogClass.ServiceAcc, new { networkServiceAccountId });
|
||||||
|
|
||||||
context.ResponseData.Write(networkServiceAccountId);
|
context.ResponseData.Write(networkServiceAccountId);
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc
|
||||||
|
|
||||||
public long Get(ServiceCtx context)
|
public long Get(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAcc, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAcc);
|
||||||
|
|
||||||
long position = context.Request.ReceiveBuff[0].Position;
|
long position = context.Request.ReceiveBuff[0].Position;
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
long uIdLow = context.RequestData.ReadInt64();
|
long uIdLow = context.RequestData.ReadInt64();
|
||||||
long uIdHigh = context.RequestData.ReadInt64();
|
long uIdHigh = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
context.ResponseData.Write(0L);
|
context.ResponseData.Write(0L);
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
public long GetPseudoDeviceId(ServiceCtx context)
|
public long GetPseudoDeviceId(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
context.ResponseData.Write(0L);
|
context.ResponseData.Write(0L);
|
||||||
context.ResponseData.Write(0L);
|
context.ResponseData.Write(0L);
|
||||||
|
@ -100,7 +100,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
public long InitializeGamePlayRecording(ServiceCtx context)
|
public long InitializeGamePlayRecording(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
int state = context.RequestData.ReadInt32();
|
int state = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
float appletVolume = context.RequestData.ReadSingle();
|
float appletVolume = context.RequestData.ReadSingle();
|
||||||
float libraryAppletVolume = context.RequestData.ReadSingle();
|
float libraryAppletVolume = context.RequestData.ReadSingle();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(1f);
|
context.ResponseData.Write(1f);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(1f);
|
context.ResponseData.Write(1f);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
float unknown0 = context.RequestData.ReadSingle();
|
float unknown0 = context.RequestData.ReadSingle();
|
||||||
long unknown1 = context.RequestData.ReadInt64();
|
long unknown1 = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
float unknown0 = context.RequestData.ReadSingle();
|
float unknown0 = context.RequestData.ReadSingle();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
context.ResponseData.Write((byte)0); //Unknown value.
|
context.ResponseData.Write((byte)0); //Unknown value.
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
public long RequestToGetForeground(ServiceCtx context)
|
public long RequestToGetForeground(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,28 +40,28 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long Start(ServiceCtx context)
|
public long Start(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long GetResult(ServiceCtx context)
|
public long GetResult(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long PushInData(ServiceCtx context)
|
public long PushInData(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,21 +42,21 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
public long Exit(ServiceCtx context)
|
public long Exit(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long LockExit(ServiceCtx context)
|
public long LockExit(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long UnlockExit(ServiceCtx context)
|
public long UnlockExit(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
bool enable = context.RequestData.ReadByte() != 0;
|
bool enable = context.RequestData.ReadByte() != 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
bool enable = context.RequestData.ReadByte() != 0;
|
bool enable = context.RequestData.ReadByte() != 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
bool enable = context.RequestData.ReadByte() != 0;
|
bool enable = context.RequestData.ReadByte() != 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
bool flag2 = context.RequestData.ReadByte() != 0;
|
bool flag2 = context.RequestData.ReadByte() != 0;
|
||||||
bool flag3 = context.RequestData.ReadByte() != 0;
|
bool flag3 = context.RequestData.ReadByte() != 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
bool enable = context.RequestData.ReadByte() != 0;
|
bool enable = context.RequestData.ReadByte() != 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
bool enable = context.RequestData.ReadByte() != 0;
|
bool enable = context.RequestData.ReadByte() != 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
int orientation = context.RequestData.ReadInt32();
|
int orientation = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
bool enable = context.RequestData.ReadByte() != 0;
|
bool enable = context.RequestData.ReadByte() != 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
_idleTimeDetectionExtension = context.RequestData.ReadInt32();
|
_idleTimeDetectionExtension = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, $"Stubbed. IdleTimeDetectionExtension: {_idleTimeDetectionExtension}");
|
Logger.PrintStub(LogClass.ServiceAm, new { _idleTimeDetectionExtension });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(_idleTimeDetectionExtension);
|
context.ResponseData.Write(_idleTimeDetectionExtension);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAm, $"Stubbed. IdleTimeDetectionExtension: {_idleTimeDetectionExtension}");
|
Logger.PrintStub(LogClass.ServiceAm, new { _idleTimeDetectionExtension });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
public long GetAppletResourceUserId(ServiceCtx context)
|
public long GetAppletResourceUserId(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
context.ResponseData.Write(0L);
|
context.ResponseData.Write(0L);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ namespace Ryujinx.HLE.HOS.Services.Am
|
||||||
|
|
||||||
public long AcquireForegroundRights(ServiceCtx context)
|
public long AcquireForegroundRights(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace Ryujinx.HLE.HOS.Services.Apm
|
||||||
|
|
||||||
context.ResponseData.Write((uint)PerformanceConfiguration.PerformanceConfiguration1);
|
context.ResponseData.Write((uint)PerformanceConfiguration.PerformanceConfiguration1);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceApm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceApm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
|
||||||
{
|
{
|
||||||
context.ResponseData.Write((int)_playState);
|
context.ResponseData.Write((int)_playState);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, $"Stubbed. Renderer State: {Enum.GetName(typeof(PlayState), _playState)}");
|
Logger.PrintStub(LogClass.ServiceAudio, new { State = Enum.GetName(typeof(PlayState), _playState) });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
|
||||||
|
|
||||||
public long StartAudioRenderer(ServiceCtx context)
|
public long StartAudioRenderer(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
_playState = PlayState.Playing;
|
_playState = PlayState.Playing;
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer
|
||||||
|
|
||||||
public long StopAudioRenderer(ServiceCtx context)
|
public long StopAudioRenderer(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
_playState = PlayState.Stopped;
|
_playState = PlayState.Stopped;
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
||||||
|
|
||||||
string deviceName = Encoding.ASCII.GetString(deviceNameBuffer);
|
string deviceName = Encoding.ASCII.GetString(deviceNameBuffer);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(2);
|
context.ResponseData.Write(2);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
||||||
|
|
||||||
string deviceName = Encoding.UTF8.GetString(deviceNameBuffer);
|
string deviceName = Encoding.UTF8.GetString(deviceNameBuffer);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(1f);
|
context.ResponseData.Write(1f);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceAudio);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,8 +178,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
int revisionInfo = context.RequestData.ReadInt32();
|
int revisionInfo = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceAudio, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceAudio, new { appletResourceUserId, revisionInfo });
|
||||||
$"RevisionInfo: {revisionInfo}");
|
|
||||||
|
|
||||||
return GetAudioDeviceService(context);
|
return GetAudioDeviceService(context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,7 +277,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
|
||||||
// bsd_error
|
// bsd_error
|
||||||
context.ResponseData.Write(0);
|
context.ResponseData.Write(0);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceBsd, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceBsd);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
|
||||||
{
|
{
|
||||||
ulong unknown0 = context.RequestData.ReadUInt64();
|
ulong unknown0 = context.RequestData.ReadUInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceBsd, $"Stubbed. Unknown0: {unknown0}");
|
Logger.PrintStub(LogClass.ServiceBsd, new { unknown0 });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -316,8 +316,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
|
||||||
|
|
||||||
WriteBsdResult(context, -1, LinuxError.EOPNOTSUPP);
|
WriteBsdResult(context, -1, LinuxError.EOPNOTSUPP);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceBsd, $"Stubbed. Path: {path} - " +
|
Logger.PrintStub(LogClass.ServiceBsd, new { path, flags });
|
||||||
$"Flags: {flags}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -327,7 +326,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
|
||||||
{
|
{
|
||||||
WriteBsdResult(context, -1, LinuxError.EOPNOTSUPP);
|
WriteBsdResult(context, -1, LinuxError.EOPNOTSUPP);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceBsd, $"Stubbed.");
|
Logger.PrintStub(LogClass.ServiceBsd);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -462,7 +461,7 @@ namespace Ryujinx.HLE.HOS.Services.Bsd
|
||||||
{
|
{
|
||||||
WriteBsdResult(context, -1, LinuxError.EOPNOTSUPP);
|
WriteBsdResult(context, -1, LinuxError.EOPNOTSUPP);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceBsd, $"Stubbed.");
|
Logger.PrintStub(LogClass.ServiceBsd);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,15 +46,17 @@ namespace Ryujinx.HLE.HOS.Services.Friend
|
||||||
// There are no friends online, so we return 0 because the nn::account::NetworkServiceAccountId array is empty.
|
// There are no friends online, so we return 0 because the nn::account::NetworkServiceAccountId array is empty.
|
||||||
context.ResponseData.Write(0);
|
context.ResponseData.Write(0);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. UserId: {uuid.ToString()} - " +
|
Logger.PrintStub(LogClass.ServiceFriend, new {
|
||||||
$"Unknown0: {unknown0} - " +
|
UserId = uuid.ToString(),
|
||||||
$"PresenceStatus: {filter.PresenceStatus} - " +
|
unknown0,
|
||||||
$"IsFavoriteOnly: {filter.IsFavoriteOnly} - " +
|
filter.PresenceStatus,
|
||||||
$"IsSameAppPresenceOnly: {filter.IsSameAppPresenceOnly} - " +
|
filter.IsFavoriteOnly,
|
||||||
$"IsSameAppPlayedOnly: {filter.IsSameAppPlayedOnly} - " +
|
filter.IsSameAppPresenceOnly,
|
||||||
$"IsArbitraryAppPlayedOnly: {filter.IsArbitraryAppPlayedOnly} - " +
|
filter.IsSameAppPlayedOnly,
|
||||||
$"PresenceGroupId: {filter.PresenceGroupId} - " +
|
filter.IsArbitraryAppPlayedOnly,
|
||||||
$"Unknown1: {unknown1}");
|
filter.PresenceGroupId,
|
||||||
|
unknown1
|
||||||
|
});
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -71,8 +73,7 @@ namespace Ryujinx.HLE.HOS.Services.Friend
|
||||||
profile.OnlinePlayState = OpenCloseState.Closed;
|
profile.OnlinePlayState = OpenCloseState.Closed;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. Uuid: {uuid.ToString()} - " +
|
Logger.PrintStub(LogClass.ServiceFriend, new { UserId = uuid.ToString(), profile.OnlinePlayState });
|
||||||
$"OnlinePlayState: {profile.OnlinePlayState}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -91,8 +92,7 @@ namespace Ryujinx.HLE.HOS.Services.Friend
|
||||||
|
|
||||||
//Todo: Write the buffer content.
|
//Todo: Write the buffer content.
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. Uuid: {uuid.ToString()} - " +
|
Logger.PrintStub(LogClass.ServiceFriend, new { UserId = uuid.ToString(), unknown0 });
|
||||||
$"Unknown0: {unknown0}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_xpadIdEventHandle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_xpadIdEventHandle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. XpadId: {xpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { xpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.Process.HandleTable.CloseHandle(_xpadIdEventHandle);
|
context.Process.HandleTable.CloseHandle(_xpadIdEventHandle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. XpadId: {xpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { xpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -252,8 +252,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int basicXpadId = context.RequestData.ReadInt32();
|
int basicXpadId = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, basicXpadId });
|
||||||
$"BasicXpadId: {basicXpadId}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -264,7 +263,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
// There is any Xpad, so we return 0 and write nothing inside the type-0xa buffer.
|
// There is any Xpad, so we return 0 and write nothing inside the type-0xa buffer.
|
||||||
context.ResponseData.Write(0L);
|
context.ResponseData.Write(0L);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed.");
|
Logger.PrintStub(LogClass.ServiceHid);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -274,7 +273,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int joyXpadId = context.RequestData.ReadInt32();
|
int joyXpadId = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {joyXpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { joyXpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -288,7 +287,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {joyXpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { joyXpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -299,7 +298,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
// There is any JoyXpad, so we return 0 and write nothing inside the type-0xa buffer.
|
// There is any JoyXpad, so we return 0 and write nothing inside the type-0xa buffer.
|
||||||
context.ResponseData.Write(0L);
|
context.ResponseData.Write(0L);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed.");
|
Logger.PrintStub(LogClass.ServiceHid);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -309,7 +308,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int basicXpadId = context.RequestData.ReadInt32();
|
int basicXpadId = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. BasicXpadId: {basicXpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { basicXpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -319,7 +318,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int basicXpadId = context.RequestData.ReadInt32();
|
int basicXpadId = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. BasicXpadId: {basicXpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { basicXpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -333,7 +332,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. BasicXpadId: {basicXpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { basicXpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -343,7 +342,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int joyXpadId = context.RequestData.ReadInt32();
|
int joyXpadId = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {joyXpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { joyXpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -353,7 +352,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int joyXpadId = context.RequestData.ReadInt32();
|
int joyXpadId = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {joyXpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { joyXpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -367,7 +366,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {joyXpadId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { joyXpadId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -378,8 +377,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -390,8 +388,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -404,9 +401,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(_sixAxisSensorFusionEnabled);
|
context.ResponseData.Write(_sixAxisSensorFusionEnabled);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _sixAxisSensorFusionEnabled });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"SixAxisSensorFusionEnabled: {_sixAxisSensorFusionEnabled}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -418,9 +413,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
int sixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _sixAxisSensorFusionEnabled });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"SixAxisSensorFusionEnabled: {_sixAxisSensorFusionEnabled}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -438,10 +431,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _sensorFusionParams.RevisePower, _sensorFusionParams.ReviseRange });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"RevisePower: {_sensorFusionParams.RevisePower} - " +
|
|
||||||
$"ReviseRange: {_sensorFusionParams.ReviseRange}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -455,10 +445,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
context.ResponseData.Write(_sensorFusionParams.RevisePower);
|
context.ResponseData.Write(_sensorFusionParams.RevisePower);
|
||||||
context.ResponseData.Write(_sensorFusionParams.ReviseRange);
|
context.ResponseData.Write(_sensorFusionParams.ReviseRange);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _sensorFusionParams.RevisePower, _sensorFusionParams.ReviseRange });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"RevisePower: {_sensorFusionParams.RevisePower} - " +
|
|
||||||
$"ReviseRange: {_sensorFusionParams.ReviseRange}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -472,10 +459,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
_sensorFusionParams.RevisePower = 0;
|
_sensorFusionParams.RevisePower = 0;
|
||||||
_sensorFusionParams.ReviseRange = 0;
|
_sensorFusionParams.ReviseRange = 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _sensorFusionParams.RevisePower, _sensorFusionParams.ReviseRange });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"RevisePower: {_sensorFusionParams.RevisePower} - " +
|
|
||||||
$"ReviseRange: {_sensorFusionParams.ReviseRange}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -493,10 +477,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _accelerometerParams.X, _accelerometerParams.Y });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"X: {_accelerometerParams.X} - " +
|
|
||||||
$"Y: {_accelerometerParams.Y}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -510,10 +491,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
context.ResponseData.Write(_accelerometerParams.X);
|
context.ResponseData.Write(_accelerometerParams.X);
|
||||||
context.ResponseData.Write(_accelerometerParams.Y);
|
context.ResponseData.Write(_accelerometerParams.Y);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _accelerometerParams.X, _accelerometerParams.Y });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"X: {_accelerometerParams.X} - " +
|
|
||||||
$"Y: {_accelerometerParams.Y}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -527,10 +505,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
_accelerometerParams.X = 0;
|
_accelerometerParams.X = 0;
|
||||||
_accelerometerParams.Y = 0;
|
_accelerometerParams.Y = 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _accelerometerParams.X, _accelerometerParams.Y });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"X: {_accelerometerParams.X} - " +
|
|
||||||
$"Y: {_accelerometerParams.Y}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -542,9 +517,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
_accelerometerPlayMode = context.RequestData.ReadUInt32();
|
_accelerometerPlayMode = context.RequestData.ReadUInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _accelerometerPlayMode });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"PlayMode: {_accelerometerPlayMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -557,9 +530,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(_accelerometerPlayMode);
|
context.ResponseData.Write(_accelerometerPlayMode);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _accelerometerPlayMode });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"PlayMode: {_accelerometerPlayMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -572,9 +543,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
_accelerometerPlayMode = 0;
|
_accelerometerPlayMode = 0;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _accelerometerPlayMode });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"PlayMode: {_accelerometerPlayMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -586,9 +555,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
_gyroscopeZeroDriftMode = (HidGyroscopeZeroDriftMode)context.RequestData.ReadInt32();
|
_gyroscopeZeroDriftMode = (HidGyroscopeZeroDriftMode)context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _gyroscopeZeroDriftMode });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"GyroscopeZeroDriftMode: {_gyroscopeZeroDriftMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -601,9 +568,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write((int)_gyroscopeZeroDriftMode);
|
context.ResponseData.Write((int)_gyroscopeZeroDriftMode);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _gyroscopeZeroDriftMode });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"GyroscopeZeroDriftMode: {_gyroscopeZeroDriftMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -616,9 +581,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
_gyroscopeZeroDriftMode = HidGyroscopeZeroDriftMode.Standard;
|
_gyroscopeZeroDriftMode = HidGyroscopeZeroDriftMode.Standard;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _gyroscopeZeroDriftMode });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"GyroscopeZeroDriftMode: {_gyroscopeZeroDriftMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -633,9 +596,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(isAtRest);
|
context.ResponseData.Write(isAtRest);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, isAtRest });
|
||||||
$"SixAxisSensorHandle: {sixAxisSensorHandle} - " +
|
|
||||||
$"IsAtRest: {isAtRest}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -646,8 +607,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
int unknown0 = context.RequestData.ReadInt32();
|
int unknown0 = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, unknown0 });
|
||||||
$"Unknown0: {unknown0}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -660,8 +620,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _npadStyleSet });
|
||||||
$"NpadStyleSet: {_npadStyleSet}");
|
|
||||||
|
|
||||||
_npadStyleSetUpdateEvent.ReadableEvent.Signal();
|
_npadStyleSetUpdateEvent.ReadableEvent.Signal();
|
||||||
|
|
||||||
|
@ -675,8 +634,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write((int)_npadStyleSet);
|
context.ResponseData.Write((int)_npadStyleSet);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _npadStyleSet });
|
||||||
$"NpadStyleSet: {_npadStyleSet}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -687,8 +645,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
HidControllerId npadIdType = (HidControllerId)context.RequestData.ReadInt64();
|
HidControllerId npadIdType = (HidControllerId)context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, npadIdType });
|
||||||
$"NpadIdType: {npadIdType}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -698,7 +655,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -708,7 +665,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -727,9 +684,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, npadId, npadStyleSet });
|
||||||
$"NpadId: {npadId} - " +
|
|
||||||
$"NpadStyleSet: {npadStyleSet}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -740,8 +695,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
int npadIdType = context.RequestData.ReadInt32();
|
int npadIdType = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, npadIdType });
|
||||||
$"NpadIdType: {npadIdType}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -755,7 +709,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(ledPattern);
|
context.ResponseData.Write(ledPattern);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {npadId} - Pattern: {ledPattern}");
|
Logger.PrintStub(LogClass.ServiceHid, new { npadId, ledPattern });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -766,7 +720,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
int unknown = context.RequestData.ReadInt32();
|
int unknown = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - Unknown: {unknown}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, unknown });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -777,8 +731,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
_npadJoyHoldType = (HidNpadJoyHoldType)context.RequestData.ReadInt64();
|
_npadJoyHoldType = (HidNpadJoyHoldType)context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _npadJoyHoldType });
|
||||||
$"NpadJoyHoldType: {_npadJoyHoldType}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -790,8 +743,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write((long)_npadJoyHoldType);
|
context.ResponseData.Write((long)_npadJoyHoldType);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _npadJoyHoldType });
|
||||||
$"NpadJoyHoldTypeValue: {_npadJoyHoldType}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -804,9 +756,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
_npadJoyAssignmentMode = HidNpadJoyAssignmentMode.Single;
|
_npadJoyAssignmentMode = HidNpadJoyAssignmentMode.Single;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, hidControllerId, _npadJoyAssignmentMode });
|
||||||
$"HidControllerId: {hidControllerId} - " +
|
|
||||||
$"NpadJoyAssignmentModeValue: {_npadJoyAssignmentMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -820,10 +770,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
_npadJoyAssignmentMode = HidNpadJoyAssignmentMode.Single;
|
_npadJoyAssignmentMode = HidNpadJoyAssignmentMode.Single;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, hidControllerId, hidNpadJoyDeviceType, _npadJoyAssignmentMode });
|
||||||
$"HidControllerId: {hidControllerId} - " +
|
|
||||||
$"HidNpadJoyDeviceType: {hidNpadJoyDeviceType} - " +
|
|
||||||
$"NpadJoyAssignmentModeValue: {_npadJoyAssignmentMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -836,9 +783,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
_npadJoyAssignmentMode = HidNpadJoyAssignmentMode.Dual;
|
_npadJoyAssignmentMode = HidNpadJoyAssignmentMode.Dual;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, hidControllerId, _npadJoyAssignmentMode });
|
||||||
$"HidControllerId: {hidControllerId} - " +
|
|
||||||
$"NpadJoyAssignmentModeValue: {_npadJoyAssignmentMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -850,9 +795,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long singleJoyId1 = context.RequestData.ReadInt32();
|
long singleJoyId1 = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, singleJoyId0, singleJoyId1 });
|
||||||
$"SingleJoyId0: {singleJoyId0} - " +
|
|
||||||
$"SingleJoyId1: {singleJoyId1}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -862,7 +805,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -872,7 +815,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -883,8 +826,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
_npadHandheldActivationMode = (HidNpadHandheldActivationMode)context.RequestData.ReadInt64();
|
_npadHandheldActivationMode = (HidNpadHandheldActivationMode)context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _npadHandheldActivationMode });
|
||||||
$"NpadHandheldActivationMode: {_npadHandheldActivationMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -896,8 +838,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write((long)_npadHandheldActivationMode);
|
context.ResponseData.Write((long)_npadHandheldActivationMode);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _npadHandheldActivationMode });
|
||||||
$"NpadHandheldActivationMode: {_npadHandheldActivationMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -909,9 +850,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int newNpadAssignment = context.RequestData.ReadInt32();
|
int newNpadAssignment = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, oldNpadAssignment, newNpadAssignment });
|
||||||
$"OldNpadAssignment: {oldNpadAssignment} - " +
|
|
||||||
$"NewNpadAssignment: {newNpadAssignment}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -924,9 +863,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(_unintendedHomeButtonInputProtectionEnabled);
|
context.ResponseData.Write(_unintendedHomeButtonInputProtectionEnabled);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, unknown0, _unintendedHomeButtonInputProtectionEnabled });
|
||||||
$"Unknown0: {unknown0} - " +
|
|
||||||
$"UnintendedHomeButtonInputProtectionEnabled: {_unintendedHomeButtonInputProtectionEnabled}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -938,9 +875,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
uint unknown0 = context.RequestData.ReadUInt32();
|
uint unknown0 = context.RequestData.ReadUInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, unknown0, _unintendedHomeButtonInputProtectionEnabled });
|
||||||
$"Unknown0: {unknown0} - " +
|
|
||||||
$"UnintendedHomeButtonInputProtectionEnable: {_unintendedHomeButtonInputProtectionEnabled}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -957,12 +892,14 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
context.ResponseData.Write(0); //Unknown0
|
context.ResponseData.Write(0); //Unknown0
|
||||||
context.ResponseData.Write(0); //Unknown1
|
context.ResponseData.Write(0); //Unknown1
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new {
|
||||||
$"HidControllerId: {hidControllerId} - " +
|
appletResourceUserId,
|
||||||
$"HidNpadJoyDeviceType: {hidNpadJoyDeviceType} - " +
|
hidControllerId,
|
||||||
$"NpadJoyAssignmentModeValue: {_npadJoyAssignmentMode} - " +
|
hidNpadJoyDeviceType,
|
||||||
$"Unknown0: 0 - " +
|
_npadJoyAssignmentMode,
|
||||||
$"Unknown1: 0");
|
Unknown0 = 0,
|
||||||
|
Unknown1 = 0
|
||||||
|
});
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -981,9 +918,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
context.ResponseData.Write((int)deviceInfo.DeviceType);
|
context.ResponseData.Write((int)deviceInfo.DeviceType);
|
||||||
context.ResponseData.Write((int)deviceInfo.Position);
|
context.ResponseData.Write((int)deviceInfo.Position);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. VibrationDeviceHandle: {vibrationDeviceHandle} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { vibrationDeviceHandle, deviceInfo.DeviceType, deviceInfo.Position });
|
||||||
$"DeviceType: {deviceInfo.DeviceType} - " +
|
|
||||||
$"Position: {deviceInfo.Position}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1003,12 +938,14 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new {
|
||||||
$"VibrationDeviceHandle: {vibrationDeviceHandle} - " +
|
appletResourceUserId,
|
||||||
$"AmplitudeLow: {_vibrationValue.AmplitudeLow} - " +
|
vibrationDeviceHandle,
|
||||||
$"FrequencyLow: {_vibrationValue.FrequencyLow} - " +
|
_vibrationValue.AmplitudeLow,
|
||||||
$"AmplitudeHigh: {_vibrationValue.AmplitudeHigh} - " +
|
_vibrationValue.FrequencyLow,
|
||||||
$"FrequencyHigh: {_vibrationValue.FrequencyHigh}");
|
_vibrationValue.AmplitudeHigh,
|
||||||
|
_vibrationValue.FrequencyHigh
|
||||||
|
});
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1024,12 +961,14 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
context.ResponseData.Write(_vibrationValue.AmplitudeHigh);
|
context.ResponseData.Write(_vibrationValue.AmplitudeHigh);
|
||||||
context.ResponseData.Write(_vibrationValue.FrequencyHigh);
|
context.ResponseData.Write(_vibrationValue.FrequencyHigh);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new {
|
||||||
$"VibrationDeviceHandle: {vibrationDeviceHandle} - " +
|
appletResourceUserId,
|
||||||
$"AmplitudeLow: {_vibrationValue.AmplitudeLow} - " +
|
vibrationDeviceHandle,
|
||||||
$"FrequencyLow: {_vibrationValue.FrequencyLow} - " +
|
_vibrationValue.AmplitudeLow,
|
||||||
$"AmplitudeHigh: {_vibrationValue.AmplitudeHigh} - " +
|
_vibrationValue.FrequencyLow,
|
||||||
$"FrequencyHigh: {_vibrationValue.FrequencyHigh}");
|
_vibrationValue.AmplitudeHigh,
|
||||||
|
_vibrationValue.FrequencyHigh
|
||||||
|
});
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1047,7 +986,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
_vibrationPermitted = context.RequestData.ReadBoolean();
|
_vibrationPermitted = context.RequestData.ReadBoolean();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. VibrationPermitted: {_vibrationPermitted}");
|
Logger.PrintStub(LogClass.ServiceHid, new { _vibrationPermitted });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1057,7 +996,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(_vibrationPermitted);
|
context.ResponseData.Write(_vibrationPermitted);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. VibrationPermitted: {_vibrationPermitted}");
|
Logger.PrintStub(LogClass.ServiceHid, new { _vibrationPermitted });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1077,9 +1016,11 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
//Todo: Read all handles and values from buffer.
|
//Todo: Read all handles and values from buffer.
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new {
|
||||||
$"VibrationDeviceHandleBufferLength: {vibrationDeviceHandleBuffer.Length} - " +
|
appletResourceUserId,
|
||||||
$"VibrationValueBufferLength: {vibrationValueBuffer.Length}");
|
VibrationDeviceHandleBufferLength = vibrationDeviceHandleBuffer.Length,
|
||||||
|
VibrationValueBufferLength = vibrationValueBuffer.Length
|
||||||
|
});
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1091,9 +1032,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long vibrationGcErmCommand = context.RequestData.ReadInt64();
|
long vibrationGcErmCommand = context.RequestData.ReadInt64();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, vibrationDeviceHandle, vibrationGcErmCommand });
|
||||||
$"VibrationDeviceHandle: {vibrationDeviceHandle} - " +
|
|
||||||
$"VibrationGcErmCommand: {vibrationGcErmCommand}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1106,9 +1045,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(_vibrationGcErmCommand);
|
context.ResponseData.Write(_vibrationGcErmCommand);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, vibrationDeviceHandle, _vibrationGcErmCommand });
|
||||||
$"VibrationDeviceHandle: {vibrationDeviceHandle} - " +
|
|
||||||
$"VibrationGcErmCommand: {_vibrationGcErmCommand}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1118,7 +1055,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1126,7 +1063,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
// EndPermitVibrationSession()
|
// EndPermitVibrationSession()
|
||||||
public long EndPermitVibrationSession(ServiceCtx context)
|
public long EndPermitVibrationSession(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed.");
|
Logger.PrintStub(LogClass.ServiceHid);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1136,7 +1073,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1147,8 +1084,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int consoleSixAxisSensorHandle = context.RequestData.ReadInt32();
|
int consoleSixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, consoleSixAxisSensorHandle });
|
||||||
$"ConsoleSixAxisSensorHandle: {consoleSixAxisSensorHandle}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1159,8 +1095,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int consoleSixAxisSensorHandle = context.RequestData.ReadInt32();
|
int consoleSixAxisSensorHandle = context.RequestData.ReadInt32();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, consoleSixAxisSensorHandle });
|
||||||
$"ConsoleSixAxisSensorHandle: {consoleSixAxisSensorHandle}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1170,7 +1105,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1180,7 +1115,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1190,7 +1125,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1204,9 +1139,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
// Todo: Determine if array<nn::sf::NativeHandle> is a buffer or not...
|
// Todo: Determine if array<nn::sf::NativeHandle> is a buffer or not...
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, counter0, counter1 });
|
||||||
$"Counter0: {counter0} - " +
|
|
||||||
$"Counter1: {counter1}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1216,7 +1149,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1227,8 +1160,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
_sevenSixAxisSensorFusionStrength = context.RequestData.ReadSingle();
|
_sevenSixAxisSensorFusionStrength = context.RequestData.ReadSingle();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _sevenSixAxisSensorFusionStrength });
|
||||||
$"SevenSixAxisSensorFusionStrength: {_sevenSixAxisSensorFusionStrength}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1240,8 +1172,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(_sevenSixAxisSensorFusionStrength);
|
context.ResponseData.Write(_sevenSixAxisSensorFusionStrength);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _sevenSixAxisSensorFusionStrength });
|
||||||
$"SevenSixAxisSensorFusionStrength: {_sevenSixAxisSensorFusionStrength}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1251,7 +1182,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(_usbFullKeyControllerEnabled);
|
context.ResponseData.Write(_usbFullKeyControllerEnabled);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. UsbFullKeyControllerEnabled: {_usbFullKeyControllerEnabled}");
|
Logger.PrintStub(LogClass.ServiceHid, new { _usbFullKeyControllerEnabled });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1261,7 +1192,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
_usbFullKeyControllerEnabled = context.RequestData.ReadBoolean();
|
_usbFullKeyControllerEnabled = context.RequestData.ReadBoolean();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. UsbFullKeyControllerEnabled: {_usbFullKeyControllerEnabled}");
|
Logger.PrintStub(LogClass.ServiceHid, new { _usbFullKeyControllerEnabled });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1273,7 +1204,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(true); //FullKeyController is always connected ?
|
context.ResponseData.Write(true); //FullKeyController is always connected ?
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. Unknown0: {unknown0} - Connected: true");
|
Logger.PrintStub(LogClass.ServiceHid, new { unknown0, Connected = true });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1285,7 +1216,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(true); //Npad always got a battery ?
|
context.ResponseData.Write(true); //Npad always got a battery ?
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {npadId} - HasBattery: true");
|
Logger.PrintStub(LogClass.ServiceHid, new { npadId, HasBattery = true });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1298,7 +1229,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
context.ResponseData.Write(true); //Npad always got a left battery ?
|
context.ResponseData.Write(true); //Npad always got a left battery ?
|
||||||
context.ResponseData.Write(true); //Npad always got a right battery ?
|
context.ResponseData.Write(true); //Npad always got a right battery ?
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {npadId} - HasLeftBattery: true - HasRightBattery: true");
|
Logger.PrintStub(LogClass.ServiceHid, new { npadId, HasLeftBattery = true, HasRightBattery = true });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1310,7 +1241,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write((byte)0);
|
context.ResponseData.Write((byte)0);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {npadId} - NpadInterfaceType: 0");
|
Logger.PrintStub(LogClass.ServiceHid, new { npadId, NpadInterfaceType = 0 });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1323,9 +1254,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
context.ResponseData.Write((byte)0);
|
context.ResponseData.Write((byte)0);
|
||||||
context.ResponseData.Write((byte)0);
|
context.ResponseData.Write((byte)0);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {npadId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { npadId, LeftInterfaceType = 0, RightInterfaceType = 0 });
|
||||||
$"LeftInterfaceType: 0 - " +
|
|
||||||
$"RightInterfaceType: 0");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1340,9 +1269,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(palmaConnectionHandle);
|
context.ResponseData.Write(palmaConnectionHandle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId , unknown0, palmaConnectionHandle });
|
||||||
$"Unknown0: {unknown0} - " +
|
|
||||||
$"PalmaConnectionHandle: {palmaConnectionHandle}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1352,7 +1279,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle}");
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle });
|
||||||
|
|
||||||
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
||||||
|
|
||||||
|
@ -1371,7 +1298,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle}");
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1385,8 +1312,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
|
|
||||||
context.ResponseData.Write(unknown0);
|
context.ResponseData.Write(unknown0);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle, unknown0 });
|
||||||
$"Unknown0: {unknown0}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1397,8 +1323,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
long unknown0 = context.RequestData.ReadInt64();
|
long unknown0 = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle, unknown0 });
|
||||||
$"Unknown0: {unknown0}");
|
|
||||||
|
|
||||||
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
||||||
|
|
||||||
|
@ -1411,8 +1336,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
long frModeType = context.RequestData.ReadInt64();
|
long frModeType = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle, frModeType });
|
||||||
$"FrModeType: {frModeType}");
|
|
||||||
|
|
||||||
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
||||||
|
|
||||||
|
@ -1424,7 +1348,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle}");
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1435,8 +1359,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
bool enabledPalmaStep = context.RequestData.ReadBoolean();
|
bool enabledPalmaStep = context.RequestData.ReadBoolean();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle, enabledPalmaStep });
|
||||||
$"EnabledPalmaStep: {enabledPalmaStep}");
|
|
||||||
|
|
||||||
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
||||||
|
|
||||||
|
@ -1448,7 +1371,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle}");
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle });
|
||||||
|
|
||||||
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
||||||
|
|
||||||
|
@ -1460,7 +1383,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle}");
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle });
|
||||||
|
|
||||||
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
||||||
|
|
||||||
|
@ -1474,9 +1397,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long unknown0 = context.RequestData.ReadInt64();
|
long unknown0 = context.RequestData.ReadInt64();
|
||||||
long unknown1 = context.RequestData.ReadInt64();
|
long unknown1 = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle, unknown0, unknown1 });
|
||||||
$"Unknown0: {unknown0} - " +
|
|
||||||
$"Unknown1: {unknown1}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1489,9 +1410,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
long unknown1 = context.RequestData.ReadInt64();
|
long unknown1 = context.RequestData.ReadInt64();
|
||||||
// nn::hid::PalmaApplicationSectionAccessBuffer cast is unknown
|
// nn::hid::PalmaApplicationSectionAccessBuffer cast is unknown
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle, unknown0, unknown1 });
|
||||||
$"Unknown0: {unknown0} - " +
|
|
||||||
$"Unknown1: {unknown1}");
|
|
||||||
|
|
||||||
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
_palmaOperationCompleteEvent.ReadableEvent.Signal();
|
||||||
|
|
||||||
|
@ -1503,7 +1422,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle}");
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1513,7 +1432,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
int palmaConnectionHandle = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {palmaConnectionHandle}");
|
Logger.PrintStub(LogClass.ServiceHid, new { palmaConnectionHandle });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1524,8 +1443,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
_npadCommunicationMode = context.RequestData.ReadInt64();
|
_npadCommunicationMode = context.RequestData.ReadInt64();
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {appletResourceUserId} - " +
|
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, _npadCommunicationMode });
|
||||||
$"NpadCommunicationMode: {_npadCommunicationMode}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1535,7 +1453,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(_npadCommunicationMode);
|
context.ResponseData.Write(_npadCommunicationMode);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. CommunicationMode: {_npadCommunicationMode}");
|
Logger.PrintStub(LogClass.ServiceHid, new { _npadCommunicationMode });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.HLE.Exceptions;
|
||||||
using Ryujinx.HLE.HOS.Ipc;
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
using Ryujinx.HLE.HOS.Kernel.Common;
|
using Ryujinx.HLE.HOS.Kernel.Common;
|
||||||
using Ryujinx.HLE.HOS.Kernel.Ipc;
|
using Ryujinx.HLE.HOS.Kernel.Ipc;
|
||||||
|
@ -117,7 +118,7 @@ namespace Ryujinx.HLE.HOS.Services
|
||||||
{
|
{
|
||||||
string dbgMessage = $"{context.Session.ServiceName} {service.GetType().Name}: {commandId}";
|
string dbgMessage = $"{context.Session.ServiceName} {service.GetType().Name}: {commandId}";
|
||||||
|
|
||||||
throw new NotImplementedException(dbgMessage);
|
throw new ServiceNotImplementedException(context, dbgMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Ryujinx.HLE.HOS.Services.Irs
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceIrs, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceIrs, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Irs
|
||||||
{
|
{
|
||||||
long appletResourceUserId = context.RequestData.ReadInt64();
|
long appletResourceUserId = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceIrs, $"Stubbed. AppletResourceUserId: {appletResourceUserId}");
|
Logger.PrintStub(LogClass.ServiceIrs, new { appletResourceUserId });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
int unknown1 = context.RequestData.ReadInt32();
|
int unknown1 = context.RequestData.ReadInt32();
|
||||||
int unknown2 = context.RequestData.ReadInt32();
|
int unknown2 = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceMm, $"Stubbed. Unknown0: {unknown0} - " +
|
Logger.PrintStub(LogClass.ServiceMm, new { unknown0, unknown1, unknown2 });
|
||||||
$"Unknown1: {unknown1} - Unknown2: {unknown2}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +42,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
{
|
{
|
||||||
context.Device.Gpu.UninitializeVideoDecoder();
|
context.Device.Gpu.UninitializeVideoDecoder();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceMm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceMm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -55,8 +54,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
int unknown1 = context.RequestData.ReadInt32();
|
int unknown1 = context.RequestData.ReadInt32();
|
||||||
int unknown2 = context.RequestData.ReadInt32();
|
int unknown2 = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceMm, $"Stubbed. Unknown0: {unknown0} - " +
|
Logger.PrintStub(LogClass.ServiceMm, new { unknown0, unknown1, unknown2 });
|
||||||
$"Unknown1: {unknown1} - Unknown2: {unknown2}");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +63,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
{
|
{
|
||||||
int unknown0 = context.RequestData.ReadInt32();
|
int unknown0 = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceMm, $"Stubbed. Unknown0: {unknown0}");
|
Logger.PrintStub(LogClass.ServiceMm, new { unknown0 });
|
||||||
|
|
||||||
context.ResponseData.Write(0);
|
context.ResponseData.Write(0);
|
||||||
|
|
||||||
|
@ -75,7 +73,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
// Initialize()
|
// Initialize()
|
||||||
public long Initialize(ServiceCtx context)
|
public long Initialize(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceMm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceMm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +83,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
{
|
{
|
||||||
context.Device.Gpu.UninitializeVideoDecoder();
|
context.Device.Gpu.UninitializeVideoDecoder();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceMm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceMm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -97,8 +95,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
int unknown1 = context.RequestData.ReadInt32();
|
int unknown1 = context.RequestData.ReadInt32();
|
||||||
int unknown2 = context.RequestData.ReadInt32();
|
int unknown2 = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceMm, $"Stubbed. Unknown0: {unknown0} - " +
|
Logger.PrintStub(LogClass.ServiceMm, new { unknown0, unknown1, unknown2 });
|
||||||
$"Unknown1: {unknown1} - Unknown2: {unknown2}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +105,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
{
|
{
|
||||||
int unknown0 = context.RequestData.ReadInt32();
|
int unknown0 = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceMm, $"Stubbed. Unknown0: {unknown0}");
|
Logger.PrintStub(LogClass.ServiceMm, new { unknown0 });
|
||||||
|
|
||||||
context.ResponseData.Write(0);
|
context.ResponseData.Write(0);
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
|
|
||||||
public long Initialize(ServiceCtx context)
|
public long Initialize(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNfp, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
_state = State.Initialized;
|
_state = State.Initialized;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
|
|
||||||
public long AttachActivateEvent(ServiceCtx context)
|
public long AttachActivateEvent(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNfp, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
if (context.Process.HandleTable.GenerateHandle(_activateEvent.ReadableEvent, out int handle) != KernelResult.Success)
|
if (context.Process.HandleTable.GenerateHandle(_activateEvent.ReadableEvent, out int handle) != KernelResult.Success)
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
|
|
||||||
public long AttachDeactivateEvent(ServiceCtx context)
|
public long AttachDeactivateEvent(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNfp, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
if (context.Process.HandleTable.GenerateHandle(_deactivateEvent.ReadableEvent, out int handle) != KernelResult.Success)
|
if (context.Process.HandleTable.GenerateHandle(_deactivateEvent.ReadableEvent, out int handle) != KernelResult.Success)
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
{
|
{
|
||||||
context.ResponseData.Write((int)_state);
|
context.ResponseData.Write((int)_state);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNfp, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
{
|
{
|
||||||
context.ResponseData.Write((int)_deviceState);
|
context.ResponseData.Write((int)_deviceState);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNfp, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -103,14 +103,14 @@ namespace Ryujinx.HLE.HOS.Services.Nfp
|
||||||
{
|
{
|
||||||
context.ResponseData.Write((int)NpadId);
|
context.ResponseData.Write((int)NpadId);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNfp, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long AttachAvailabilityChangeEvent(ServiceCtx context)
|
public long AttachAvailabilityChangeEvent(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNfp, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNfp);
|
||||||
|
|
||||||
if (context.Process.HandleTable.GenerateHandle(_availabilityChangeEvent.ReadableEvent, out int handle) != KernelResult.Success)
|
if (context.Process.HandleTable.GenerateHandle(_availabilityChangeEvent.ReadableEvent, out int handle) != KernelResult.Success)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
|
||||||
|
|
||||||
MakeObject(context, new IRequest(context.Device.System));
|
MakeObject(context, new IRequest(context.Device.System));
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNifm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,14 +36,14 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(1);
|
context.ResponseData.Write(1);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNifm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long GetResult(ServiceCtx context)
|
public long GetResult(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNifm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -67,21 +67,21 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
|
||||||
|
|
||||||
public long Cancel(ServiceCtx context)
|
public long Cancel(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNifm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long Submit(ServiceCtx context)
|
public long Submit(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNifm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long SetConnectionConfirmationOption(ServiceCtx context)
|
public long SetConnectionConfirmationOption(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNifm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,14 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
||||||
{
|
{
|
||||||
context.ResponseData.Write(0);
|
context.ResponseData.Write(0);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNs, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNs);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long ListAddOnContent(ServiceCtx context)
|
public static long ListAddOnContent(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNs, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNs);
|
||||||
|
|
||||||
//TODO: This is supposed to write a u32 array aswell.
|
//TODO: This is supposed to write a u32 array aswell.
|
||||||
//It's unknown what it contains.
|
//It's unknown what it contains.
|
||||||
|
|
|
@ -150,7 +150,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
|
||||||
|
|
||||||
public long FinishInitialize(ServiceCtx context)
|
public long FinishInitialize(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||||
|
|
||||||
MemoryHelper.Write(context.Memory, outputPosition, args);
|
MemoryHelper.Write(context.Memory, outputPosition, args);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||||
|
|
||||||
MemoryHelper.Write(context.Memory, outputPosition, args);
|
MemoryHelper.Write(context.Memory, outputPosition, args);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuGpu
|
||||||
|
|
||||||
MemoryHelper.Write(context.Memory, outputPosition, args);
|
MemoryHelper.Write(context.Memory, outputPosition, args);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
|
||||||
long inputPosition = context.Request.GetBufferType0x21().Position;
|
long inputPosition = context.Request.GetBufferType0x21().Position;
|
||||||
long outputPosition = context.Request.GetBufferType0x22().Position;
|
long outputPosition = context.Request.GetBufferType0x22().Position;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
|
||||||
|
|
||||||
int eventId = context.Memory.ReadInt32(inputPosition);
|
int eventId = context.Memory.ReadInt32(inputPosition);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceNv);
|
||||||
|
|
||||||
return NvResult.Success;
|
return NvResult.Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace Ryujinx.HLE.HOS.Services.Prepo
|
||||||
|
|
||||||
public static long SaveReportWithUser(ServiceCtx context)
|
public static long SaveReportWithUser(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServicePrepo, "Stubbed.");
|
Logger.PrintStub(LogClass.ServicePrepo);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
||||||
|
|
||||||
context.ResponseData.Write(chargePercentage);
|
context.ResponseData.Write(chargePercentage);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServicePsm, $"Stubbed. ChargePercentage: {chargePercentage}");
|
Logger.PrintStub(LogClass.ServicePsm, new { chargePercentage });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,11 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
||||||
// GetChargerType() -> u32
|
// GetChargerType() -> u32
|
||||||
public static long GetChargerType(ServiceCtx context)
|
public static long GetChargerType(ServiceCtx context)
|
||||||
{
|
{
|
||||||
context.ResponseData.Write((int)ChargerType.ChargerOrDock);
|
ChargerType chargerType = ChargerType.ChargerOrDock;
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServicePsm, $"Stubbed. ChargerType: {ChargerType.ChargerOrDock}");
|
context.ResponseData.Write((int)chargerType);
|
||||||
|
|
||||||
|
Logger.PrintStub(LogClass.ServicePsm, new { chargerType });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
||||||
|
|
||||||
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_stateChangeEventHandle);
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_stateChangeEventHandle);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServicePsm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServicePsm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
||||||
_stateChangeEventHandle = -1;
|
_stateChangeEventHandle = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServicePsm, "Stubbed.");
|
Logger.PrintStub(LogClass.ServicePsm);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
||||||
{
|
{
|
||||||
bool chargerTypeChangeEventEnabled = context.RequestData.ReadBoolean();
|
bool chargerTypeChangeEventEnabled = context.RequestData.ReadBoolean();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServicePsm, $"Stubbed. ChargerTypeChangeEventEnabled: {chargerTypeChangeEventEnabled}");
|
Logger.PrintStub(LogClass.ServicePsm, new { chargerTypeChangeEventEnabled });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
||||||
{
|
{
|
||||||
bool powerSupplyChangeEventEnabled = context.RequestData.ReadBoolean();
|
bool powerSupplyChangeEventEnabled = context.RequestData.ReadBoolean();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServicePsm, $"Stubbed. PowerSupplyChangeEventEnabled: {powerSupplyChangeEventEnabled}");
|
Logger.PrintStub(LogClass.ServicePsm, new { powerSupplyChangeEventEnabled });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
||||||
{
|
{
|
||||||
bool batteryVoltageStateChangeEventEnabled = context.RequestData.ReadBoolean();
|
bool batteryVoltageStateChangeEventEnabled = context.RequestData.ReadBoolean();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServicePsm, $"Stubbed. BatteryVoltageStateChangeEventEnabled: {batteryVoltageStateChangeEventEnabled}");
|
Logger.PrintStub(LogClass.ServicePsm, new { batteryVoltageStateChangeEventEnabled });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@ namespace Ryujinx.HLE.HOS.Services.Sfdnsres
|
||||||
long bufferSize = context.Request.SendBuff[0].Size;
|
long bufferSize = context.Request.SendBuff[0].Size;
|
||||||
|
|
||||||
// TODO: This is stubbed in 2.0.0+, reverse 1.0.0 version for the sake completeness.
|
// TODO: This is stubbed in 2.0.0+, reverse 1.0.0 version for the sake completeness.
|
||||||
Logger.PrintStub(LogClass.ServiceSfdnsres, $"Stubbed. Unknown0: {unknown0}");
|
Logger.PrintStub(LogClass.ServiceSfdnsres, new { unknown0 });
|
||||||
|
|
||||||
return MakeError(ErrorModule.Os, 1023);
|
return MakeError(ErrorModule.Os, 1023);
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ namespace Ryujinx.HLE.HOS.Services.Sfdnsres
|
||||||
uint unknown0 = context.RequestData.ReadUInt32();
|
uint unknown0 = context.RequestData.ReadUInt32();
|
||||||
|
|
||||||
// TODO: This is stubbed in 2.0.0+, reverse 1.0.0 version for the sake completeness.
|
// TODO: This is stubbed in 2.0.0+, reverse 1.0.0 version for the sake completeness.
|
||||||
Logger.PrintStub(LogClass.ServiceSfdnsres, $"Stubbed. Unknown0: {unknown0}");
|
Logger.PrintStub(LogClass.ServiceSfdnsres, new { unknown0 });
|
||||||
|
|
||||||
return MakeError(ErrorModule.Os, 1023);
|
return MakeError(ErrorModule.Os, 1023);
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ namespace Ryujinx.HLE.HOS.Services.Sfdnsres
|
||||||
|
|
||||||
context.ResponseData.Write(0);
|
context.ResponseData.Write(0);
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceSfdnsres, $"Stubbed. Unknown0: {unknown0}");
|
Logger.PrintStub(LogClass.ServiceSfdnsres, new { unknown0 });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -380,8 +380,7 @@ namespace Ryujinx.HLE.HOS.Services.Sfdnsres
|
||||||
uint unknown0 = context.RequestData.ReadUInt32();
|
uint unknown0 = context.RequestData.ReadUInt32();
|
||||||
ulong unknown1 = context.RequestData.ReadUInt64();
|
ulong unknown1 = context.RequestData.ReadUInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceSfdnsres, $"Stubbed. Unknown0: {unknown0} - " +
|
Logger.PrintStub(LogClass.ServiceSfdnsres, new { unknown0, unknown1 });
|
||||||
$"Unknown1: {unknown1}");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -391,7 +390,7 @@ namespace Ryujinx.HLE.HOS.Services.Sfdnsres
|
||||||
{
|
{
|
||||||
uint unknown0 = context.RequestData.ReadUInt32();
|
uint unknown0 = context.RequestData.ReadUInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceSfdnsres, $"Stubbed. Unknown0: {unknown0}");
|
Logger.PrintStub(LogClass.ServiceSfdnsres, new { unknown0 });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace Ryujinx.HLE.HOS.Services.Ssl
|
||||||
int sslVersion = context.RequestData.ReadInt32();
|
int sslVersion = context.RequestData.ReadInt32();
|
||||||
long unknown = context.RequestData.ReadInt64();
|
long unknown = context.RequestData.ReadInt64();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceSsl, $"Stubbed. SslVersion: {sslVersion} - Unknown: {unknown}");
|
Logger.PrintStub(LogClass.ServiceSsl, new { sslVersion, unknown });
|
||||||
|
|
||||||
MakeObject(context, new ISslContext());
|
MakeObject(context, new ISslContext());
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.Ssl
|
||||||
{
|
{
|
||||||
int version = context.RequestData.ReadInt32();
|
int version = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.PrintStub(LogClass.ServiceSsl, $"Stubbed. Version: {version}");
|
Logger.PrintStub(LogClass.ServiceSsl, new { version });
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi
|
||||||
|
|
||||||
public static long CreateManagedLayer(ServiceCtx context)
|
public static long CreateManagedLayer(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceVi);
|
||||||
|
|
||||||
context.ResponseData.Write(0L); //LayerId
|
context.ResponseData.Write(0L); //LayerId
|
||||||
|
|
||||||
|
@ -32,21 +32,21 @@ namespace Ryujinx.HLE.HOS.Services.Vi
|
||||||
|
|
||||||
public long DestroyManagedLayer(ServiceCtx context)
|
public long DestroyManagedLayer(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceVi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long AddToLayerStack(ServiceCtx context)
|
public static long AddToLayerStack(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceVi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long SetLayerVisibility(ServiceCtx context)
|
public static long SetLayerVisibility(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceVi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,14 @@ namespace Ryujinx.HLE.HOS.Services.Vi
|
||||||
|
|
||||||
public static long SetLayerZ(ServiceCtx context)
|
public static long SetLayerZ(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceVi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long SetLayerVisibility(ServiceCtx context)
|
public static long SetLayerVisibility(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
|
Logger.PrintStub(LogClass.ServiceVi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ using Ryujinx.Common.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Ryujinx
|
namespace Ryujinx
|
||||||
|
@ -14,8 +16,6 @@ namespace Ryujinx
|
||||||
|
|
||||||
private static Dictionary<LogLevel, ConsoleColor> _logColors;
|
private static Dictionary<LogLevel, ConsoleColor> _logColors;
|
||||||
|
|
||||||
private static object _consoleLock;
|
|
||||||
|
|
||||||
static ConsoleLog()
|
static ConsoleLog()
|
||||||
{
|
{
|
||||||
_logColors = new Dictionary<LogLevel, ConsoleColor>()
|
_logColors = new Dictionary<LogLevel, ConsoleColor>()
|
||||||
|
@ -28,8 +28,6 @@ namespace Ryujinx
|
||||||
|
|
||||||
_messageQueue = new BlockingCollection<LogEventArgs>(10);
|
_messageQueue = new BlockingCollection<LogEventArgs>(10);
|
||||||
|
|
||||||
_consoleLock = new object();
|
|
||||||
|
|
||||||
_messageThread = new Thread(() =>
|
_messageThread = new Thread(() =>
|
||||||
{
|
{
|
||||||
while (!_messageQueue.IsCompleted)
|
while (!_messageQueue.IsCompleted)
|
||||||
|
@ -55,25 +53,46 @@ namespace Ryujinx
|
||||||
|
|
||||||
private static void PrintLog(LogEventArgs e)
|
private static void PrintLog(LogEventArgs e)
|
||||||
{
|
{
|
||||||
string formattedTime = e.Time.ToString(@"hh\:mm\:ss\.fff");
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
string currentThread = Thread.CurrentThread.ManagedThreadId.ToString("d4");
|
sb.AppendFormat(@"{0:hh\:mm\:ss\.fff}", e.Time);
|
||||||
|
sb.Append(" | ");
|
||||||
|
sb.AppendFormat("{0:d4}", e.ThreadId);
|
||||||
|
sb.Append(' ');
|
||||||
|
sb.Append(e.Message);
|
||||||
|
|
||||||
string message = formattedTime + " | " + currentThread + " " + e.Message;
|
if (e.Data != null)
|
||||||
|
{
|
||||||
|
PropertyInfo[] props = e.Data.GetType().GetProperties();
|
||||||
|
|
||||||
|
sb.Append(' ');
|
||||||
|
|
||||||
|
foreach (var prop in props)
|
||||||
|
{
|
||||||
|
sb.Append(prop.Name);
|
||||||
|
sb.Append(": ");
|
||||||
|
sb.Append(prop.GetValue(e.Data));
|
||||||
|
sb.Append(" - ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// We remove the final '-' from the string
|
||||||
|
if (props.Length > 0)
|
||||||
|
{
|
||||||
|
sb.Remove(sb.Length - 3, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_logColors.TryGetValue(e.Level, out ConsoleColor color))
|
if (_logColors.TryGetValue(e.Level, out ConsoleColor color))
|
||||||
{
|
{
|
||||||
lock (_consoleLock)
|
Console.ForegroundColor = color;
|
||||||
{
|
|
||||||
Console.ForegroundColor = color;
|
|
||||||
|
|
||||||
Console.WriteLine(message);
|
Console.WriteLine(sb.ToString());
|
||||||
Console.ResetColor();
|
|
||||||
}
|
Console.ResetColor();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine(message);
|
Console.WriteLine(sb.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue