mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-14 16:37:07 +00:00
misc: chore: Android: Remove redundant qualifiers
This commit is contained in:
parent
2f7406aaca
commit
b4eaa5f262
11 changed files with 41 additions and 32 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using LibKenjinx.Android;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Cpu;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
|
|
@ -113,7 +114,7 @@ namespace LibKenjinx
|
|||
|
||||
_isActive = true;
|
||||
|
||||
if (Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (PlatformInfo.IsBionic)
|
||||
{
|
||||
setRenderingThread();
|
||||
}
|
||||
|
|
@ -164,7 +165,7 @@ namespace LibKenjinx
|
|||
{
|
||||
void SetInfo(string status, float value)
|
||||
{
|
||||
if(Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if(PlatformInfo.IsBionic)
|
||||
{
|
||||
Interop.UpdateProgress(status, value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ namespace Ryujinx.Common.Logging
|
|||
|
||||
_time = Stopwatch.StartNew();
|
||||
|
||||
if (!Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (!PlatformInfo.IsBionic)
|
||||
{
|
||||
// Logger should log to console by default
|
||||
AddTarget(new AsyncLogTargetWrapper(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Cpu.Nce
|
||||
|
|
@ -11,7 +12,7 @@ namespace Ryujinx.Cpu.Nce
|
|||
|
||||
public static IntPtr GetCurrentThreadHandle()
|
||||
{
|
||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
return NceThreadPalUnix.GetCurrentThreadHandle();
|
||||
}
|
||||
|
|
@ -23,7 +24,7 @@ namespace Ryujinx.Cpu.Nce
|
|||
|
||||
public static void SuspendThread(IntPtr handle)
|
||||
{
|
||||
if (Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (PlatformInfo.IsBionic)
|
||||
{
|
||||
NceThreadPalAndroid.SuspendThread(handle);
|
||||
}
|
||||
|
|
@ -37,4 +38,4 @@ namespace Ryujinx.Cpu.Nce
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
|
@ -70,7 +71,7 @@ namespace Ryujinx.Cpu.Signal
|
|||
int result;
|
||||
SigAction old;
|
||||
|
||||
if (Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (PlatformInfo.IsBionic)
|
||||
{
|
||||
result = sigaction(SIGSEGV, IntPtr.Zero, out SigActionBionic tmp);
|
||||
|
||||
|
|
@ -100,7 +101,7 @@ namespace Ryujinx.Cpu.Signal
|
|||
int result;
|
||||
SigAction old;
|
||||
|
||||
if (Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (PlatformInfo.IsBionic)
|
||||
{
|
||||
SigActionBionic sig = new()
|
||||
{
|
||||
|
|
@ -187,7 +188,7 @@ namespace Ryujinx.Cpu.Signal
|
|||
{
|
||||
int result;
|
||||
|
||||
if (Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (PlatformInfo.IsBionic)
|
||||
{
|
||||
SigActionBionic sig = new()
|
||||
{
|
||||
|
|
@ -235,7 +236,7 @@ namespace Ryujinx.Cpu.Signal
|
|||
|
||||
public static bool RestoreExceptionHandler(SigAction oldAction)
|
||||
{
|
||||
if (Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (PlatformInfo.IsBionic)
|
||||
{
|
||||
SigActionBionic tmp = new SigActionBionic
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using Ryujinx.Graphics.Vulkan.Effects;
|
||||
using Silk.NET.Vulkan;
|
||||
|
|
@ -142,10 +143,10 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
ImageFormat = surfaceFormat.Format,
|
||||
ImageColorSpace = surfaceFormat.ColorSpace,
|
||||
ImageExtent = extent,
|
||||
ImageUsage = ImageUsageFlags.ColorAttachmentBit | ImageUsageFlags.TransferDstBit | (Ryujinx.Common.PlatformInfo.IsBionic ? 0 : ImageUsageFlags.StorageBit),
|
||||
ImageUsage = ImageUsageFlags.ColorAttachmentBit | ImageUsageFlags.TransferDstBit | (PlatformInfo.IsBionic ? 0 : ImageUsageFlags.StorageBit),
|
||||
ImageSharingMode = SharingMode.Exclusive,
|
||||
ImageArrayLayers = 1,
|
||||
PreTransform = Ryujinx.Common.PlatformInfo.IsBionic ? SurfaceTransformFlagsKHR.IdentityBitKhr : capabilities.CurrentTransform,
|
||||
PreTransform = PlatformInfo.IsBionic ? SurfaceTransformFlagsKHR.IdentityBitKhr : capabilities.CurrentTransform,
|
||||
CompositeAlpha = ChooseCompositeAlpha(capabilities.SupportedCompositeAlpha),
|
||||
PresentMode = ChooseSwapPresentMode(presentModes, _vSyncMode),
|
||||
Clipped = true,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
|||
IsAnyInternetRequestAccepted = true, // NOTE: Why not accept any internet request?
|
||||
};
|
||||
|
||||
if (!Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (!PlatformInfo.IsBionic)
|
||||
{
|
||||
NetworkChange.NetworkAddressChanged += LocalInterfaceCacheHandler;
|
||||
}
|
||||
|
|
@ -199,7 +199,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
|||
{
|
||||
if (isDisposing)
|
||||
{
|
||||
if (!Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if (!PlatformInfo.IsBionic)
|
||||
{
|
||||
NetworkChange.NetworkAddressChanged -= LocalInterfaceCacheHandler;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.HOS.Kernel.Common;
|
||||
using Ryujinx.HLE.HOS.Services.Spl.Types;
|
||||
|
|
@ -51,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Services.Spl
|
|||
|
||||
context.ResponseData.Write(configValue);
|
||||
|
||||
if(Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
if(PlatformInfo.IsBionic)
|
||||
{
|
||||
if (result == SmcResult.Success)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
|
|
@ -426,7 +427,7 @@ namespace Ryujinx.Memory
|
|||
return OperatingSystem.IsWindowsVersionAtLeast(10, 0, 17134);
|
||||
}
|
||||
|
||||
return OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic;
|
||||
return OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
|
|
@ -12,7 +13,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
return MemoryManagementWindows.Allocate((IntPtr)size);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
return MemoryManagementUnix.Allocate(size, forJit);
|
||||
}
|
||||
|
|
@ -28,7 +29,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
return MemoryManagementWindows.Reserve((IntPtr)size, viewCompatible);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
return MemoryManagementUnix.Reserve(size, forJit);
|
||||
}
|
||||
|
|
@ -44,7 +45,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
MemoryManagementWindows.Commit(address, (IntPtr)size);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
MemoryManagementUnix.Commit(address, size, forJit);
|
||||
}
|
||||
|
|
@ -60,7 +61,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
MemoryManagementWindows.Decommit(address, (IntPtr)size);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
MemoryManagementUnix.Decommit(address, size);
|
||||
}
|
||||
|
|
@ -76,7 +77,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
MemoryManagementWindows.MapView(sharedMemory, srcOffset, address, (IntPtr)size, owner);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
MemoryManagementUnix.MapView(sharedMemory, srcOffset, address, size);
|
||||
}
|
||||
|
|
@ -92,7 +93,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
MemoryManagementWindows.UnmapView(sharedMemory, address, (IntPtr)size, owner);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
MemoryManagementUnix.UnmapView(address, size);
|
||||
}
|
||||
|
|
@ -110,7 +111,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
result = MemoryManagementWindows.Reprotect(address, (IntPtr)size, permission, forView);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
result = MemoryManagementUnix.Reprotect(address, size, permission);
|
||||
}
|
||||
|
|
@ -131,7 +132,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
return MemoryManagementWindows.Free(address, (IntPtr)size);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
return MemoryManagementUnix.Free(address);
|
||||
}
|
||||
|
|
@ -147,7 +148,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
return MemoryManagementWindows.CreateSharedMemory((IntPtr)size, reserve);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
return MemoryManagementUnix.CreateSharedMemory(size, reserve);
|
||||
}
|
||||
|
|
@ -163,7 +164,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
MemoryManagementWindows.DestroySharedMemory(handle);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
MemoryManagementUnix.DestroySharedMemory(handle);
|
||||
}
|
||||
|
|
@ -179,7 +180,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
return MemoryManagementWindows.MapSharedMemory(handle);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
return MemoryManagementUnix.MapSharedMemory(handle, size);
|
||||
}
|
||||
|
|
@ -195,7 +196,7 @@ namespace Ryujinx.Memory
|
|||
{
|
||||
MemoryManagementWindows.UnmapSharedMemory(address);
|
||||
}
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || Common.PlatformInfo.IsBionic)
|
||||
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || PlatformInfo.IsBionic)
|
||||
{
|
||||
MemoryManagementUnix.UnmapSharedMemory(address, size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Logging;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
|
|
@ -160,7 +161,7 @@ namespace Ryujinx.Memory
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (Ryujinx.Common.PlatformInfo.IsBionic)
|
||||
else if (PlatformInfo.IsBionic)
|
||||
{
|
||||
byte[] memName = "Ryujinx-XXXXXX"u8.ToArray();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Common;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
|
@ -113,7 +114,7 @@ namespace Ryujinx.Memory
|
|||
|
||||
if (flags.HasFlag(MmapFlags.MAP_ANONYMOUS))
|
||||
{
|
||||
if (OperatingSystem.IsLinux() || Common.PlatformInfo.IsBionic)
|
||||
if (OperatingSystem.IsLinux() || PlatformInfo.IsBionic)
|
||||
{
|
||||
result |= MAP_ANONYMOUS_LINUX_GENERIC;
|
||||
}
|
||||
|
|
@ -129,7 +130,7 @@ namespace Ryujinx.Memory
|
|||
|
||||
if (flags.HasFlag(MmapFlags.MAP_NORESERVE))
|
||||
{
|
||||
if (OperatingSystem.IsLinux() || Common.PlatformInfo.IsBionic)
|
||||
if (OperatingSystem.IsLinux() || PlatformInfo.IsBionic)
|
||||
{
|
||||
result |= MAP_NORESERVE_LINUX_GENERIC;
|
||||
}
|
||||
|
|
@ -145,7 +146,7 @@ namespace Ryujinx.Memory
|
|||
|
||||
if (flags.HasFlag(MmapFlags.MAP_UNLOCKED))
|
||||
{
|
||||
if (OperatingSystem.IsLinux() || Common.PlatformInfo.IsBionic)
|
||||
if (OperatingSystem.IsLinux() || PlatformInfo.IsBionic)
|
||||
{
|
||||
result |= MAP_UNLOCKED_LINUX_GENERIC;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue