Improve stubs
This commit is contained in:
parent
6caa41f71f
commit
ee78c1c6bc
1 changed files with 23 additions and 0 deletions
|
@ -13,10 +13,13 @@ namespace Ryujinx.HLE.OsHle.Services.Am
|
||||||
|
|
||||||
private KEvent LaunchableEvent;
|
private KEvent LaunchableEvent;
|
||||||
|
|
||||||
|
public bool IsExitLocked = false;
|
||||||
|
|
||||||
public ISelfController()
|
public ISelfController()
|
||||||
{
|
{
|
||||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||||
{
|
{
|
||||||
|
{ 0, Exit },
|
||||||
{ 1, LockExit },
|
{ 1, LockExit },
|
||||||
{ 2, UnlockExit },
|
{ 2, UnlockExit },
|
||||||
{ 9, GetLibraryAppletLaunchableEvent },
|
{ 9, GetLibraryAppletLaunchableEvent },
|
||||||
|
@ -32,13 +35,33 @@ namespace Ryujinx.HLE.OsHle.Services.Am
|
||||||
LaunchableEvent = new KEvent();
|
LaunchableEvent = new KEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long Exit(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
if(IsExitLocked == false)
|
||||||
|
{
|
||||||
|
Context.Ns.Log.PrintInfo("Applet requested exit (IsExitLocked = false)");
|
||||||
|
//Exit the applet
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Context.Ns.Log.PrintInfo("Applet requested exit, but not allowed (IsExitLocked = true)");
|
||||||
|
}
|
||||||
|
|
||||||
|
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
public long LockExit(ServiceCtx Context)
|
public long LockExit(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
|
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||||
|
IsExitLocked = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long UnlockExit(ServiceCtx Context)
|
public long UnlockExit(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
|
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||||
|
IsExitLocked = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue