mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-07-02 16:20:48 -07:00
Fix disposing of IPC sessions server at emulation stop (#2334)
This commit is contained in:
@ -8,7 +8,7 @@ using System;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.LibraryAppletCreator
|
||||
{
|
||||
class ILibraryAppletAccessor : IpcService, IDisposable
|
||||
class ILibraryAppletAccessor : DisposableIpcService
|
||||
{
|
||||
private KernelContext _kernelContext;
|
||||
|
||||
@ -241,21 +241,24 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
if (_stateChangedEventHandle != 0)
|
||||
if (isDisposing)
|
||||
{
|
||||
_kernelContext.Syscall.CloseHandle(_stateChangedEventHandle);
|
||||
}
|
||||
if (_stateChangedEventHandle != 0)
|
||||
{
|
||||
_kernelContext.Syscall.CloseHandle(_stateChangedEventHandle);
|
||||
}
|
||||
|
||||
if (_normalOutDataEventHandle != 0)
|
||||
{
|
||||
_kernelContext.Syscall.CloseHandle(_normalOutDataEventHandle);
|
||||
}
|
||||
if (_normalOutDataEventHandle != 0)
|
||||
{
|
||||
_kernelContext.Syscall.CloseHandle(_normalOutDataEventHandle);
|
||||
}
|
||||
|
||||
if (_interactiveOutDataEventHandle != 0)
|
||||
{
|
||||
_kernelContext.Syscall.CloseHandle(_interactiveOutDataEventHandle);
|
||||
if (_interactiveOutDataEventHandle != 0)
|
||||
{
|
||||
_kernelContext.Syscall.CloseHandle(_interactiveOutDataEventHandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user