mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-11-20 01:21:15 +01:00
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:
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,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user