mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-10 13:18:59 +02:00
misc: chore: Merge into pattern
This commit is contained in:
@@ -137,7 +137,7 @@ namespace Ryujinx.Horizon.Prepo.Ipc
|
||||
{
|
||||
enabled = false;
|
||||
|
||||
if (_permissionLevel == PrepoServicePermissionLevel.User || _permissionLevel == PrepoServicePermissionLevel.System)
|
||||
if (_permissionLevel is PrepoServicePermissionLevel.User or PrepoServicePermissionLevel.System)
|
||||
{
|
||||
enabled = _userAgreementCheckEnabled;
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Ryujinx.Horizon.Prepo.Ipc
|
||||
[CmifCommand(40101)] // 2.0.0+
|
||||
public Result SetUserAgreementCheckEnabled(bool enabled)
|
||||
{
|
||||
if (_permissionLevel == PrepoServicePermissionLevel.User || _permissionLevel == PrepoServicePermissionLevel.System)
|
||||
if (_permissionLevel is PrepoServicePermissionLevel.User or PrepoServicePermissionLevel.System)
|
||||
{
|
||||
_userAgreementCheckEnabled = enabled;
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace Ryujinx.Horizon.Sdk.Codec.Detail
|
||||
{
|
||||
const int SilkDecoderSize = 0x2160;
|
||||
|
||||
if (channelsCount < 1 || channelsCount > 2)
|
||||
if (channelsCount is < 1 or > 2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace Ryujinx.Horizon.Sdk.Ngc.Detail
|
||||
text[startOffset] = 0xc1;
|
||||
text[startOffset + 1] = 0xc1;
|
||||
}
|
||||
else if (maskMode == MaskMode.Overwrite || maskMode == MaskMode.ReplaceByOneCharacter)
|
||||
else if (maskMode is MaskMode.Overwrite or MaskMode.ReplaceByOneCharacter)
|
||||
{
|
||||
text[startOffset] = 0xc0;
|
||||
text[startOffset + 1] = 0xc0;
|
||||
|
||||
@@ -62,8 +62,7 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
|
||||
|
||||
Result commandResult = commandHandler.Invoke(ref outHeader, ref context, inMessageRawData);
|
||||
|
||||
if (commandResult.Module == SfResult.ModuleId ||
|
||||
commandResult.Module == HipcResult.ModuleId)
|
||||
if (commandResult.Module is SfResult.ModuleId or HipcResult.ModuleId)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.KernelIpc, $"{commandHandler.MethodName} returned error {commandResult}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user