aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2020-12-09 00:08:36 +0100
committerGitHub <noreply@github.com>2020-12-09 00:08:36 +0100
commit3484265d37732b32951709e5abfa52a260db349d (patch)
treea4d0866bdec9fe2fbe165d01f69ab302549113da /Ryujinx.HLE/HOS/Services
parent4594c3b31014655fb0b37f1305598fc3cbafdc73 (diff)
am: Implement GetHealthWarningDisappearedSystemEvent (#1788)
This implement IApplicationFunctions GetHealthWarningDisappearedSystemEvent call which is needed by Mario Kart 8 in Chinese version. Call was checked by RE. We still have to determine where to signals some AM events. Thanks to Kakasita on our Discord to reported this and confirm this works fine!
Diffstat (limited to 'Ryujinx.HLE/HOS/Services')
-rw-r--r--Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
index 6a5ad4c1..fc11441f 100644
--- a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
+++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
@@ -27,16 +27,20 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
private KEvent _gpuErrorDetectedSystemEvent;
private KEvent _friendInvitationStorageChannelEvent;
private KEvent _notificationStorageChannelEvent;
+ private KEvent _healthWarningDisappearedSystemEvent;
private int _gpuErrorDetectedSystemEventHandle;
private int _friendInvitationStorageChannelEventHandle;
private int _notificationStorageChannelEventHandle;
+ private int _healthWarningDisappearedSystemEventHandle;
public IApplicationFunctions(Horizon system)
{
+ // TODO: Find where they are signaled.
_gpuErrorDetectedSystemEvent = new KEvent(system.KernelContext);
_friendInvitationStorageChannelEvent = new KEvent(system.KernelContext);
_notificationStorageChannelEvent = new KEvent(system.KernelContext);
+ _healthWarningDisappearedSystemEvent = new KEvent(system.KernelContext);
}
[Command(1)]
@@ -521,5 +525,22 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
return ResultCode.Success;
}
+
+ [Command(160)] // 9.0.0+
+ // GetHealthWarningDisappearedSystemEvent() -> handle<copy>
+ public ResultCode GetHealthWarningDisappearedSystemEvent(ServiceCtx context)
+ {
+ if (_healthWarningDisappearedSystemEventHandle == 0)
+ {
+ if (context.Process.HandleTable.GenerateHandle(_healthWarningDisappearedSystemEvent.ReadableEvent, out _healthWarningDisappearedSystemEventHandle) != KernelResult.Success)
+ {
+ throw new InvalidOperationException("Out of handles!");
+ }
+ }
+
+ context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_healthWarningDisappearedSystemEventHandle);
+
+ return ResultCode.Success;
+ }
}
} \ No newline at end of file