implement get npad set event

This commit is contained in:
emmaus 2018-07-26 17:42:26 +00:00
parent b92189cb71
commit d161cbf550
2 changed files with 18 additions and 2 deletions

View file

@ -25,7 +25,8 @@ namespace Ryujinx.HLE.OsHle
internal HSharedMem HidSharedMem { get; private set; }
internal HSharedMem FontSharedMem { get; private set; }
internal KEvent VsyncEvent { get; private set; }
internal KEvent VsyncEvent { get; private set; }
internal KEvent NpadStyleSetUpdateEvent { get; private set; }
public Horizon(Switch Ns)
{
@ -42,7 +43,8 @@ namespace Ryujinx.HLE.OsHle
HidSharedMem = new HSharedMem();
FontSharedMem = new HSharedMem();
VsyncEvent = new KEvent();
VsyncEvent = new KEvent();
NpadStyleSetUpdateEvent = new KEvent();
}
public void LoadCart(string ExeFsDir, string RomFsFile = null)
@ -124,6 +126,8 @@ namespace Ryujinx.HLE.OsHle
public void SignalVsync() => VsyncEvent.WaitEvent.Set();
public void SignalNpadStyleSetUpdate() => NpadStyleSetUpdateEvent.WaitEvent.Set();
private Process MakeProcess()
{
Process Process;
@ -209,6 +213,8 @@ namespace Ryujinx.HLE.OsHle
VsyncEvent.Dispose();
NpadStyleSetUpdateEvent.Dispose();
Scheduler.Dispose();
}
}

View file

@ -26,6 +26,7 @@ namespace Ryujinx.HLE.OsHle.Services.Hid
{ 101, GetSupportedNpadStyleSet },
{ 102, SetSupportedNpadIdType },
{ 103, ActivateNpad },
{ 106, AcquireNpadStyleSetUpdateEventHandle },
{ 108, GetPlayerLedPattern },
{ 120, SetNpadJoyHoldType },
{ 121, GetNpadJoyHoldType },
@ -104,6 +105,15 @@ namespace Ryujinx.HLE.OsHle.Services.Hid
return 0;
}
public long AcquireNpadStyleSetUpdateEventHandle(ServiceCtx Context)
{
int Handle = Context.Process.HandleTable.OpenHandle(Context.Ns.Os.NpadStyleSetUpdateEvent);
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
return 0;
}
public long GetSupportedNpadStyleSet(ServiceCtx Context)
{
Context.ResponseData.Write(0);