Stub a few services, add support for generating call stacks on the CPU

This commit is contained in:
gdkchan
2018-04-22 01:21:49 -03:00
parent 4906acdde9
commit bd9b1e2c6b
20 changed files with 267 additions and 41 deletions

View File

@@ -6,7 +6,7 @@ using System.Text;
namespace Ryujinx.Core.OsHle.Services.Aud
{
class IAudioDeviceService : IpcService
class IAudioDevice : IpcService
{
private Dictionary<int, ServiceProcessRequest> m_Commands;
@@ -14,12 +14,13 @@ namespace Ryujinx.Core.OsHle.Services.Aud
private KEvent SystemEvent;
public IAudioDeviceService()
public IAudioDevice()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, ListAudioDeviceName },
{ 1, SetAudioDeviceOutputVolume },
{ 3, GetActiveAudioDeviceName },
{ 4, QueryAudioDeviceSystemEvent },
{ 5, GetActiveChannelCount }
};
@@ -72,6 +73,20 @@ namespace Ryujinx.Core.OsHle.Services.Aud
return 0;
}
public long GetActiveAudioDeviceName(ServiceCtx Context)
{
string Name = "FIXME";
long Position = Context.Request.ReceiveBuff[0].Position;
long Size = Context.Request.ReceiveBuff[0].Size;
byte[] Buffer = Encoding.ASCII.GetBytes(Name + '\0');
AMemoryHelper.WriteBytes(Context.Memory, Position, Buffer);
return 0;
}
public long QueryAudioDeviceSystemEvent(ServiceCtx Context)
{
int Handle = Context.Process.HandleTable.OpenHandle(SystemEvent);

View File

@@ -53,7 +53,7 @@ namespace Ryujinx.Core.OsHle.Services.Aud
{
long UserId = Context.RequestData.ReadInt64();
MakeObject(Context, new IAudioDeviceService());
MakeObject(Context, new IAudioDevice());
return 0;
}