Implement NGC service (#5681)

* Implement NGC service

* Use raw byte arrays instead of string for _wordSeparators

* Silence IDE0230 for _wordSeparators

* Try to silence warning about _rangeValuesCount not being read on SparseSet

* Make AcType enum private

* Add abstract methods and one TODO that I forgot

* PR feedback

* More PR feedback

* More PR feedback
This commit is contained in:
gdkchan authored and GitHub committed 2023-09-27 19:21:26 +02:00
1 parent 4bd2ca3f0d
commit 01c2b8097c
44 files changed
+4630 -4

No files matched your search

@@ -0,0 +1,27 @@
using Ryujinx.Horizon.Common;
namespace Ryujinx.Horizon.Sdk.Ngc.Detail
{
enum Utf8ParseResult
{
Success = 0,
InvalidCharacter = 2,
InvalidPointer = 0x16,
InvalidSize = 0x22,
InvalidString = 0x54,
}
static class Utf8ParseResultExtensions
{
public static Result ToHorizonResult(this Utf8ParseResult result)
{
return result switch
{
Utf8ParseResult.Success => Result.Success,
Utf8ParseResult.InvalidSize => NgcResult.InvalidSize,
Utf8ParseResult.InvalidString => NgcResult.InvalidUtf8Encoding,
_ => NgcResult.InvalidPointer,
};
}
}
}