mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-04-17 14:34:05 -05:00

* 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
28 lines
724 B
C#
28 lines
724 B
C#
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,
|
|
};
|
|
}
|
|
}
|
|
}
|