lbl: Migrate service to Horizon (#5628)

* lbl: Migrate service to Horizon

* Fix formatting

* Addresses gdkchan's feedback

* Fix comments
This commit is contained in:
Ac_K
2023-09-14 09:50:19 +02:00
committed by GitHub
parent e2cfe6fe44
commit e6700b314f
17 changed files with 311 additions and 181 deletions

View File

@@ -5,7 +5,7 @@ using System;
namespace Ryujinx.Horizon.Sdk.Sm
{
class SmApi
public class SmApi : IDisposable
{
private const string SmName = "sm:";
@@ -109,5 +109,17 @@ namespace Ryujinx.Horizon.Sdk.Sm
return ServiceUtil.SendRequest(out _, _portHandle, 4, sendPid: true, data);
}
public void Dispose()
{
if (_portHandle != 0)
{
HorizonStatic.Syscall.CloseHandle(_portHandle);
_portHandle = 0;
}
GC.SuppressFinalize(this);
}
}
}