Add special log for stubs (#81)

* add stub loglevel

* add log for stubbed methods
This commit is contained in:
emmauss
2018-04-17 03:24:42 +03:00
committed by gdkchan
parent 494e6dfa1e
commit b334aab435
19 changed files with 122 additions and 14 deletions

View File

@@ -22,6 +22,8 @@ namespace Ryujinx.Core.OsHle.Services.Acc
public long ListOpenUsers(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
return 0;
}
@@ -34,6 +36,8 @@ namespace Ryujinx.Core.OsHle.Services.Acc
public long InitializeApplicationInfo(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
return 0;
}

View File

@@ -19,12 +19,16 @@ namespace Ryujinx.Core.OsHle.Services.Acc
}
public long CheckAvailability(ServiceCtx Context)
{
{
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
return 0;
}
public long GetAccountId(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAcc, "AccountId = 0xcafeL");
Context.ResponseData.Write(0xcafeL);
return 0;

View File

@@ -19,6 +19,8 @@ namespace Ryujinx.Core.OsHle.Services.Acc
public long GetBase(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAcc, "Stubbed");
Context.ResponseData.Write(0L);
Context.ResponseData.Write(0L);
Context.ResponseData.Write(0L);

View File

@@ -37,6 +37,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
long UIdLow = Context.RequestData.ReadInt64();
long UIdHigh = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceAm, $"UidLow = {UIdLow}, UidHigh = {UIdHigh}");
Context.ResponseData.Write(0L);
return 0;
@@ -44,6 +46,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
public long GetDesiredLanguage(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAm, "LanguageId = 1");
//This is an enumerator where each number is a differnet language.
//0 is Japanese and 1 is English, need to figure out the other codes.
Context.ResponseData.Write(1L);

View File

@@ -32,6 +32,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
{
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
Logging.Stub(LogClass.ServiceAm, $"ScreenShot Allowed = {Enable}");
return 0;
}
@@ -39,6 +41,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
{
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
Logging.Stub(LogClass.ServiceAm, $"OperationMode Changed = {Enable}");
return 0;
}
@@ -46,6 +50,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
{
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
Logging.Stub(LogClass.ServiceAm, $"PerformanceMode Changed = {Enable}");
return 0;
}
@@ -55,6 +61,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
bool Flag2 = Context.RequestData.ReadByte() != 0 ? true : false;
bool Flag3 = Context.RequestData.ReadByte() != 0 ? true : false;
Logging.Stub(LogClass.ServiceAm, $"Focus Handling Mode Flags = {{{Flag1}|{Flag2}|{Flag3}}}");
return 0;
}
@@ -62,6 +70,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
{
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
Logging.Stub(LogClass.ServiceAm, $"Restart Message Enabled = {Enable}");
return 0;
}
@@ -69,6 +79,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
{
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;
Logging.Stub(LogClass.ServiceAm, $"Out Of Focus Suspending Enabled = {Enable}");
return 0;
}
}

View File

@@ -20,6 +20,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
public long GetAppletResourceUserId(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAm, $"Applet Resource Id = 0");
Context.ResponseData.Write(0L);
return 0;
@@ -27,6 +29,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
public long AcquireForegroundRights(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAm, "Stubbed");
return 0;
}
}

View File

@@ -32,6 +32,9 @@ namespace Ryujinx.Core.OsHle.Services.Apm
Context.ResponseData.Write((uint)PerformanceConfiguration.PerformanceConfiguration1);
Logging.Stub(LogClass.ServiceApm, $"PerformanceMode = {PerfMode}, PerformanceConfiguration =" +
$" {PerformanceConfiguration.PerformanceConfiguration1}");
return 0;
}
}

View File

@@ -57,6 +57,8 @@ namespace Ryujinx.Core.OsHle.Services.Aud
string Name = AMemoryHelper.ReadAsciiString(Context.Memory, Position, Size);
Logging.Stub(LogClass.ServiceAudio, $"Volume = {Volume}, Position = {Position}, Size = {Size}");
return 0;
}
}

View File

@@ -124,14 +124,14 @@ namespace Ryujinx.Core.OsHle.Services.Aud
public long AppendAudioOutBufferEx(ServiceCtx Context)
{
Logging.Warn(LogClass.ServiceAudio, "Not implemented!");
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
return 0;
}
public long GetReleasedAudioOutBufferEx(ServiceCtx Context)
{
Logging.Warn(LogClass.ServiceAudio, "Not implemented!");
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
return 0;
}

View File

@@ -54,11 +54,15 @@ namespace Ryujinx.Core.OsHle.Services.Aud
public long StartAudioRenderer(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
return 0;
}
public long StopAudioRenderer(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
return 0;
}

View File

@@ -42,6 +42,8 @@ namespace Ryujinx.Core.OsHle.Services.Aud
int Unknown2c = Context.RequestData.ReadInt32();
int Rev1Magic = Context.RequestData.ReadInt32();
Logging.Stub(LogClass.ServiceAudio, "BufferSize = 0x400L");
Context.ResponseData.Write(0x400L);
return 0;

View File

@@ -45,6 +45,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
public long ActivateDebugPad(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -52,6 +54,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{
long AppletResourceUserId = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -59,6 +63,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{
long AppletResourceUserId = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -66,6 +72,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{
long AppletResourceUserId = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -75,6 +83,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
long AppletResourceUserId = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -82,6 +92,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{
Context.ResponseData.Write(0);
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -90,6 +102,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
long Unknown0 = Context.RequestData.ReadInt64();
long Unknown8 = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -97,6 +111,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{
long Unknown = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -104,6 +120,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{
long Unknown = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -112,6 +130,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
long Unknown0 = Context.RequestData.ReadInt64();
long Unknown8 = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -119,6 +139,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{
Context.ResponseData.Write(0L);
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -127,6 +149,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
long AppletUserResourseId = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -136,6 +160,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
long AppletUserResourseId = Context.RequestData.ReadInt64();
long NpadJoyDeviceType = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -144,6 +170,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
long AppletUserResourseId = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -153,6 +181,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
long Unknown8 = Context.RequestData.ReadInt32();
long AppletUserResourseId = Context.RequestData.ReadInt64();
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
@@ -160,6 +190,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
{
int VibrationDeviceHandle = Context.RequestData.ReadInt32();
Logging.Stub(LogClass.ServiceHid, $"VibrationDeviceHandle = {VibrationDeviceHandle}, VibrationDeviceInfo = 0");
Context.ResponseData.Write(0L); //VibrationDeviceInfoForIpc
return 0;
@@ -174,6 +206,8 @@ namespace Ryujinx.Core.OsHle.Services.Hid
public long SendVibrationValues(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceHid, "Stubbed");
return 0;
}
}

View File

@@ -24,7 +24,7 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
MakeObject(Context, new IRequest());
//Todo: Stub
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
return 0;
}

View File

@@ -31,14 +31,14 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
{
Context.ResponseData.Write(0);
//Todo: Stub
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
return 0;
}
public long GetResult(ServiceCtx Context)
{
//Todo: Stub
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
return 0;
}
@@ -56,14 +56,14 @@ namespace Ryujinx.Core.OsHle.Services.Nifm
public long Cancel(ServiceCtx Context)
{
//Todo: Stub
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
return 0;
}
public long Submit(ServiceCtx Context)
{
//Todo: Stub
Logging.Stub(LogClass.ServiceNifm, "Stubbed");
return 0;
}

View File

@@ -22,11 +22,15 @@ namespace Ryujinx.Core.OsHle.Services.Ns
{
Context.ResponseData.Write(0);
Logging.Stub(LogClass.ServiceNs, "Stubbed");
return 0;
}
public static long ListAddOnContent(ServiceCtx Context)
{
Logging.Stub(LogClass.ServiceNs, "Stubbed");
//TODO: This is supposed to write a u32 array aswell.
//It's unknown what it contains.
Context.ResponseData.Write(0);

View File

@@ -1,4 +1,5 @@
using Ryujinx.Core.OsHle.Ipc;
using Ryujinx.Core.Settings;
using System.Collections.Generic;
namespace Ryujinx.Core.OsHle.Services.Set
@@ -27,6 +28,9 @@ namespace Ryujinx.Core.OsHle.Services.Set
public static long SetColorSetId(ServiceCtx Context)
{
int ColorSetId = Context.RequestData.ReadInt32();
Context.Ns.Settings.ThemeColor = (ColorSet)ColorSetId;
return 0;
}
}