diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 20bdc19d1..000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: weekly
- labels:
- - "infra"
- reviewers:
- - TSRBerry
- commit-message:
- prefix: "ci"
-
- - package-ecosystem: nuget
- directory: /
- open-pull-requests-limit: 10
- schedule:
- interval: daily
- labels:
- - "infra"
- reviewers:
- - TSRBerry
- commit-message:
- prefix: nuget
- groups:
- Avalonia:
- patterns:
- - "*Avalonia*"
- Silk.NET:
- patterns:
- - "Silk.NET*"
- OpenTK:
- patterns:
- - "OpenTK*"
- SixLabors:
- patterns:
- - "SixLabors*"
- NUnit:
- patterns:
- - "NUnit*"
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3d90d4df2..ba1a2df9c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -7,6 +7,7 @@ env:
POWERSHELL_TELEMETRY_OPTOUT: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
RYUJINX_BASE_VERSION: "1.2.0"
+ RELEASE: 0
jobs:
build:
@@ -73,6 +74,37 @@ jobs:
chmod +x ./publish_sdl2_headless/Ryujinx.Headless.SDL2 ./publish_sdl2_headless/Ryujinx.sh
if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
+ #- name: Build AppImage
+ # if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
+ # run: |
+ # PLATFORM_NAME="${{ matrix.platform.name }}"
+
+ # sudo apt install -y zsync desktop-file-utils appstream
+
+ # mkdir -p tools
+ # export PATH="$PATH:$(readlink -f tools)"
+
+ # # Setup appimagetool
+ # wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
+ # chmod +x tools/appimagetool
+ # chmod +x distribution/linux/appimage/build-appimage.sh
+
+ # Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
+ # if [ "$PLATFORM_NAME" = "linux-x64" ]; then
+ # ARCH_NAME=x64
+ # export ARCH=x86_64
+ # elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
+ # ARCH_NAME=arm64
+ # export ARCH=aarch64
+ # else
+ # echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
+ # exit 1
+ # fi
+
+ # export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|*-$ARCH_NAME.AppImage.zsync"
+ # BUILDDIR=publish OUTDIR=publish_appimage distribution/linux/appimage/build-appimage.sh
+ # shell: bash
+
- name: Upload Ryujinx artifact
uses: actions/upload-artifact@v4
with:
@@ -80,6 +112,13 @@ jobs:
path: publish
if: github.event_name == 'pull_request' && matrix.platform.os != 'macos-13'
+ #- name: Upload Ryujinx (AppImage) artifact
+ # uses: actions/upload-artifact@v4
+ # if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
+ # with:
+ # name: ryujinx-${{ matrix.configuration }}-${{ env.RYUJINX_BASE_VERSION }}+${{ steps.git_short_hash.outputs.result }}-${{ matrix.platform.zip_os_name }}-AppImage
+ # path: publish_appimage
+
- name: Upload Ryujinx.Headless.SDL2 artifact
uses: actions/upload-artifact@v4
with:
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 2bef2d8e0..43c5f227a 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -1,4 +1,4 @@
-name: Perform checks
+name: Build PR
on:
pull_request:
@@ -20,55 +20,6 @@ concurrency:
cancel-in-progress: true
jobs:
- format:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - uses: actions/setup-dotnet@v4
- with:
- global-json-file: global.json
-
- - name: Overwrite csc problem matcher
- run: echo "::add-matcher::.github/csc.json"
-
- - run: dotnet restore
-
- - name: Print dotnet format version
- run: dotnet format --version
-
- - name: Run dotnet format whitespace
- run: |
- dotnet format whitespace --verify-no-changes --report ./whitespace-report.json -v d
-
- # For some unknown reason this step sometimes fails with exit code 139 (segfault?),
- # so in that case we'll try again (3 tries max).
- - name: Run dotnet format style
- uses: TSRBerry/unstable-commands@v1
- with:
- commands: dotnet format style --severity info --verify-no-changes --report ./style-report.json -v d
- timeout-minutes: 5
- retry-codes: 139
-
- # For some unknown reason this step sometimes fails with exit code 139 (segfault?),
- # so in that case we'll try again (3 tries max).
- - name: Run dotnet format analyzers
- uses: TSRBerry/unstable-commands@v1
- with:
- commands: dotnet format analyzers --severity info --verify-no-changes --report ./analyzers-report.json -v d
- timeout-minutes: 5
- retry-codes: 139
-
- - name: Upload report
- if: failure()
- uses: actions/upload-artifact@v4
- with:
- name: dotnet-format
- path: ./*-report.json
-
pr_build:
uses: ./.github/workflows/build.yml
- needs: format
secrets: inherit
diff --git a/.github/workflows/nightly_pr_comment.yml b/.github/workflows/nightly_pr_comment.yml
index e8886e971..64705b6ee 100644
--- a/.github/workflows/nightly_pr_comment.yml
+++ b/.github/workflows/nightly_pr_comment.yml
@@ -2,7 +2,7 @@ name: Comment PR artifacts links
on:
workflow_run:
- workflows: ['Perform checks']
+ workflows: ['Build PR']
types: [completed]
jobs:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2a2cefe71..3caedacfc 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -23,6 +23,7 @@ env:
RYUJINX_TARGET_RELEASE_CHANNEL_NAME: "master"
RYUJINX_TARGET_RELEASE_CHANNEL_OWNER: "GreemDev"
RYUJINX_TARGET_RELEASE_CHANNEL_REPO: "Ryujinx"
+ RELEASE: 1
jobs:
tag:
@@ -128,12 +129,51 @@ jobs:
tar -czvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
popd
shell: bash
+
+ #- name: Build AppImage (Linux)
+ # if: matrix.platform.os == 'ubuntu-latest'
+ # run: |
+ # BUILD_VERSION="${{ steps.version_info.outputs.build_version }}"
+ # PLATFORM_NAME="${{ matrix.platform.name }}"
+
+ # sudo apt install -y zsync desktop-file-utils appstream
+
+ # mkdir -p tools
+ # export PATH="$PATH:$(readlink -f tools)"
+
+ # Setup appimagetool
+ # wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
+ # chmod +x tools/appimagetool
+ # chmod +x distribution/linux/appimage/build-appimage.sh
+
+ # Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
+ # if [ "$PLATFORM_NAME" = "linux-x64" ]; then
+ # ARCH_NAME=x64
+ # export ARCH=x86_64
+ # elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
+ # ARCH_NAME=arm64
+ # export ARCH=aarch64
+ # else
+ # echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
+ # exit 1
+ # fi
+
+ # export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|*-$ARCH_NAME.AppImage.zsync"
+ # BUILDDIR=publish_ava OUTDIR=publish_ava_appimage distribution/linux/appimage/build-appimage.sh
+
+ # Add to release output
+ # pushd publish_ava_appimage
+ # mv Ryujinx.AppImage ../release_output/ryujinx-$BUILD_VERSION-$ARCH_NAME.AppImage
+ # mv Ryujinx.AppImage.zsync ../release_output/ryujinx-$BUILD_VERSION-$ARCH_NAME.AppImage.zsync
+ # popd
+ # shell: bash
- name: Pushing new release
uses: ncipollo/release-action@v1
with:
name: ${{ steps.version_info.outputs.build_version }}
artifacts: "release_output/*.tar.gz,release_output/*.zip"
+ #artifacts: "release_output/*.tar.gz,release_output/*.zip/*AppImage*"
tag: ${{ steps.version_info.outputs.build_version }}
body: "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }}"
omitBodyDuringUpdate: true
diff --git a/.gitignore b/.gitignore
index 37b419d07..f71237b1a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,8 @@ x64/
build/
[Bb]in/
[Oo]bj/
+AppDir/
+publish_appimage/
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/
diff --git a/README.md b/README.md
index b9b3af721..22f601083 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,9 @@
This fork is intended to be a direct continuation for existing Ryujinx users.
Guides and documentation will not be provided at this time, though you can find the old ones on the Internet Archive.
+
+ If you would like a version more true to original Ryujinx, check out ryujinx-mirror.
+
diff --git a/Ryujinx.sln.DotSettings b/Ryujinx.sln.DotSettings
index ed7f3e911..018aa1331 100644
--- a/Ryujinx.sln.DotSettings
+++ b/Ryujinx.sln.DotSettings
@@ -3,9 +3,13 @@
WARNING
UseExplicitType
UseExplicitType
- <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="I" Suffix="" Style="AaBb" /></Policy>
+ GL
+ SDL
+ OS
+ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="I" Suffix="" Style="AaBb" /></Policy>
<Policy><Descriptor Staticness="Any" AccessRightKinds="Any" Description="Types and namespaces"><ElementKinds><Kind Name="NAMESPACE" /><Kind Name="CLASS" /><Kind Name="STRUCT" /><Kind Name="ENUM" /><Kind Name="DELEGATE" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="I" Suffix="" Style="AaBb" /></Policy></Policy>
True
+ True
True
True
True
@@ -20,4 +24,4 @@
True
True
True
-
\ No newline at end of file
+
diff --git a/distribution/linux/appimage/AppRun b/distribution/linux/appimage/AppRun
new file mode 100755
index 000000000..adbb70a0a
--- /dev/null
+++ b/distribution/linux/appimage/AppRun
@@ -0,0 +1,3 @@
+#!/bin/sh
+CURRENTDIR="$(readlink -f "$(dirname "$0")")"
+exec "$CURRENTDIR"/usr/bin/Ryujinx.sh "$@"
diff --git a/distribution/linux/appimage/build-appimage.sh b/distribution/linux/appimage/build-appimage.sh
new file mode 100755
index 000000000..5c32d78a8
--- /dev/null
+++ b/distribution/linux/appimage/build-appimage.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+set -eu
+
+ROOTDIR="$(readlink -f "$(dirname "$0")")"/../../../
+cd "$ROOTDIR"
+
+BUILDDIR=${BUILDDIR:-publish}
+OUTDIR=${OUTDIR:-publish_appimage}
+UFLAG=${UFLAG:-"gh-releases-zsync|GreemDev|ryujinx|latest|*-x64.AppImage.zsync"}
+
+rm -rf AppDir
+mkdir -p AppDir/usr/bin
+
+cp distribution/linux/Ryujinx.desktop AppDir/Ryujinx.desktop
+cp distribution/linux/appimage/AppRun AppDir/AppRun
+cp src/Ryujinx.UI.Common/Resources/Logo_Ryujinx.png AppDir/Ryujinx.svg
+
+
+cp -r "$BUILDDIR"/* AppDir/usr/bin/
+
+# Ensure necessary bins are set as executable
+chmod +x AppDir/AppRun AppDir/usr/bin/Ryujinx*
+
+mkdir -p "$OUTDIR"
+
+appimagetool --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 21 \
+ -u "$UFLAG" \
+ AppDir "$OUTDIR"/Ryujinx.AppImage
+
+# Move zsync file needed for delta updates
+if [ "$RELEASE" = "1" ]; then
+ mv ./*.AppImage.zsync "$OUTDIR"
+fi
diff --git a/src/ARMeilleure/CodeGen/Arm64/HardwareCapabilities.cs b/src/ARMeilleure/CodeGen/Arm64/HardwareCapabilities.cs
index 86afc2b4d..639e4476b 100644
--- a/src/ARMeilleure/CodeGen/Arm64/HardwareCapabilities.cs
+++ b/src/ARMeilleure/CodeGen/Arm64/HardwareCapabilities.cs
@@ -127,13 +127,13 @@ namespace ARMeilleure.CodeGen.Arm64
#region macOS
[LibraryImport("libSystem.dylib", SetLastError = true)]
- private static unsafe partial int sysctlbyname([MarshalAs(UnmanagedType.LPStr)] string name, out int oldValue, ref ulong oldSize, IntPtr newValue, ulong newValueSize);
+ private static unsafe partial int sysctlbyname([MarshalAs(UnmanagedType.LPStr)] string name, out int oldValue, ref ulong oldSize, nint newValue, ulong newValueSize);
[SupportedOSPlatform("macos")]
private static bool CheckSysctlName(string name)
{
ulong size = sizeof(int);
- if (sysctlbyname(name, out int val, ref size, IntPtr.Zero, 0) == 0 && size == sizeof(int))
+ if (sysctlbyname(name, out int val, ref size, nint.Zero, 0) == 0 && size == sizeof(int))
{
return val != 0;
}
diff --git a/src/ARMeilleure/CodeGen/CompiledFunction.cs b/src/ARMeilleure/CodeGen/CompiledFunction.cs
index 3844cbfc9..8ea7ff532 100644
--- a/src/ARMeilleure/CodeGen/CompiledFunction.cs
+++ b/src/ARMeilleure/CodeGen/CompiledFunction.cs
@@ -58,7 +58,7 @@ namespace ARMeilleure.CodeGen
/// Type of delegate
/// Pointer to the function code in memory
/// A delegate of type pointing to the mapped function
- public T MapWithPointer(out IntPtr codePointer)
+ public T MapWithPointer(out nint codePointer)
{
codePointer = JitCache.Map(this);
diff --git a/src/ARMeilleure/CodeGen/RegisterAllocators/LiveInterval.cs b/src/ARMeilleure/CodeGen/RegisterAllocators/LiveInterval.cs
index cfe1bc7ca..3a16186d2 100644
--- a/src/ARMeilleure/CodeGen/RegisterAllocators/LiveInterval.cs
+++ b/src/ARMeilleure/CodeGen/RegisterAllocators/LiveInterval.cs
@@ -387,7 +387,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
public override int GetHashCode()
{
- return HashCode.Combine((IntPtr)_data);
+ return HashCode.Combine((nint)_data);
}
public override string ToString()
diff --git a/src/ARMeilleure/CodeGen/RegisterAllocators/LiveRange.cs b/src/ARMeilleure/CodeGen/RegisterAllocators/LiveRange.cs
index 412d597e8..dcd573a9d 100644
--- a/src/ARMeilleure/CodeGen/RegisterAllocators/LiveRange.cs
+++ b/src/ARMeilleure/CodeGen/RegisterAllocators/LiveRange.cs
@@ -63,7 +63,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
public override int GetHashCode()
{
- return HashCode.Combine((IntPtr)_data);
+ return HashCode.Combine((nint)_data);
}
public override string ToString()
diff --git a/src/ARMeilleure/Common/AddressTable.cs b/src/ARMeilleure/Common/AddressTable.cs
index fcab3a202..a3ffaf470 100644
--- a/src/ARMeilleure/Common/AddressTable.cs
+++ b/src/ARMeilleure/Common/AddressTable.cs
@@ -55,7 +55,7 @@ namespace ARMeilleure.Common
private bool _disposed;
private TEntry** _table;
- private readonly List _pages;
+ private readonly List _pages;
///
/// Gets the bits used by the of the instance.
@@ -76,7 +76,7 @@ namespace ARMeilleure.Common
/// Gets the base address of the .
///
/// instance was disposed
- public IntPtr Base
+ public nint Base
{
get
{
@@ -84,7 +84,7 @@ namespace ARMeilleure.Common
lock (_pages)
{
- return (IntPtr)GetRootPage();
+ return (nint)GetRootPage();
}
}
}
@@ -104,7 +104,7 @@ namespace ARMeilleure.Common
throw new ArgumentException("Table must be at least 2 levels deep.", nameof(levels));
}
- _pages = new List(capacity: 16);
+ _pages = new List(capacity: 16);
Levels = levels;
Mask = 0;
@@ -168,7 +168,7 @@ namespace ARMeilleure.Common
nextPage = i == Levels.Length - 2 ?
(TEntry*)Allocate(1 << nextLevel.Length, Fill, leaf: true) :
- (TEntry*)Allocate(1 << nextLevel.Length, IntPtr.Zero, leaf: false);
+ (TEntry*)Allocate(1 << nextLevel.Length, nint.Zero, leaf: false);
}
page = (TEntry**)nextPage;
@@ -185,7 +185,7 @@ namespace ARMeilleure.Common
{
if (_table == null)
{
- _table = (TEntry**)Allocate(1 << Levels[0].Length, fill: IntPtr.Zero, leaf: false);
+ _table = (TEntry**)Allocate(1 << Levels[0].Length, fill: nint.Zero, leaf: false);
}
return _table;
@@ -199,10 +199,10 @@ namespace ARMeilleure.Common
/// Fill value
/// if leaf; otherwise
/// Allocated block
- private IntPtr Allocate(int length, T fill, bool leaf) where T : unmanaged
+ private nint Allocate(int length, T fill, bool leaf) where T : unmanaged
{
var size = sizeof(T) * length;
- var page = (IntPtr)NativeAllocator.Instance.Allocate((uint)size);
+ var page = (nint)NativeAllocator.Instance.Allocate((uint)size);
var span = new Span((void*)page, length);
span.Fill(fill);
diff --git a/src/ARMeilleure/Common/ArenaAllocator.cs b/src/ARMeilleure/Common/ArenaAllocator.cs
index ce8e33913..f9dbcbb20 100644
--- a/src/ARMeilleure/Common/ArenaAllocator.cs
+++ b/src/ARMeilleure/Common/ArenaAllocator.cs
@@ -20,7 +20,7 @@ namespace ARMeilleure.Common
private List _pages;
private readonly ulong _pageSize;
private readonly uint _pageCount;
- private readonly List _extras;
+ private readonly List _extras;
public ArenaAllocator(uint pageSize, uint pageCount)
{
@@ -31,11 +31,11 @@ namespace ARMeilleure.Common
_pageIndex = -1;
_page = null;
- _pages = new List();
+ _pages = [];
_pageSize = pageSize;
_pageCount = pageCount;
- _extras = new List();
+ _extras = [];
}
public Span AllocateSpan(ulong count) where T : unmanaged
@@ -64,7 +64,7 @@ namespace ARMeilleure.Common
{
void* extra = NativeAllocator.Instance.Allocate(size);
- _extras.Add((IntPtr)extra);
+ _extras.Add((nint)extra);
return extra;
}
@@ -84,7 +84,7 @@ namespace ARMeilleure.Common
{
_page = new PageInfo
{
- Pointer = (byte*)NativeAllocator.Instance.Allocate(_pageSize),
+ Pointer = (byte*)NativeAllocator.Instance.Allocate(_pageSize)
};
_pages.Add(_page);
@@ -114,7 +114,7 @@ namespace ARMeilleure.Common
}
// Free extra blocks that are not page-sized
- foreach (IntPtr ptr in _extras)
+ foreach (nint ptr in _extras)
{
NativeAllocator.Instance.Free((void*)ptr);
}
@@ -173,7 +173,7 @@ namespace ARMeilleure.Common
NativeAllocator.Instance.Free(info.Pointer);
}
- foreach (IntPtr ptr in _extras)
+ foreach (nint ptr in _extras)
{
NativeAllocator.Instance.Free((void*)ptr);
}
diff --git a/src/ARMeilleure/Common/EntryTable.cs b/src/ARMeilleure/Common/EntryTable.cs
index 625e3f73f..e49a0989e 100644
--- a/src/ARMeilleure/Common/EntryTable.cs
+++ b/src/ARMeilleure/Common/EntryTable.cs
@@ -15,7 +15,7 @@ namespace ARMeilleure.Common
private int _freeHint;
private readonly int _pageCapacity; // Number of entries per page.
private readonly int _pageLogCapacity;
- private readonly Dictionary _pages;
+ private readonly Dictionary _pages;
private readonly BitMap _allocated;
///
@@ -41,7 +41,7 @@ namespace ARMeilleure.Common
}
_allocated = new BitMap(NativeAllocator.Instance);
- _pages = new Dictionary();
+ _pages = new Dictionary();
_pageLogCapacity = BitOperations.Log2((uint)(pageSize / sizeof(TEntry)));
_pageCapacity = 1 << _pageLogCapacity;
}
@@ -138,9 +138,9 @@ namespace ARMeilleure.Common
{
var pageIndex = (int)((uint)(index & ~(_pageCapacity - 1)) >> _pageLogCapacity);
- if (!_pages.TryGetValue(pageIndex, out IntPtr page))
+ if (!_pages.TryGetValue(pageIndex, out nint page))
{
- page = (IntPtr)NativeAllocator.Instance.Allocate((uint)sizeof(TEntry) * (uint)_pageCapacity);
+ page = (nint)NativeAllocator.Instance.Allocate((uint)sizeof(TEntry) * (uint)_pageCapacity);
_pages.Add(pageIndex, page);
}
diff --git a/src/ARMeilleure/Common/NativeAllocator.cs b/src/ARMeilleure/Common/NativeAllocator.cs
index 93c48adda..ca5d3a850 100644
--- a/src/ARMeilleure/Common/NativeAllocator.cs
+++ b/src/ARMeilleure/Common/NativeAllocator.cs
@@ -9,7 +9,7 @@ namespace ARMeilleure.Common
public override void* Allocate(ulong size)
{
- void* result = (void*)Marshal.AllocHGlobal((IntPtr)size);
+ void* result = (void*)Marshal.AllocHGlobal((nint)size);
if (result == null)
{
@@ -21,7 +21,7 @@ namespace ARMeilleure.Common
public override void Free(void* block)
{
- Marshal.FreeHGlobal((IntPtr)block);
+ Marshal.FreeHGlobal((nint)block);
}
}
}
diff --git a/src/ARMeilleure/IntermediateRepresentation/IntrusiveList.cs b/src/ARMeilleure/IntermediateRepresentation/IntrusiveList.cs
index 8d300075d..642e5aa90 100644
--- a/src/ARMeilleure/IntermediateRepresentation/IntrusiveList.cs
+++ b/src/ARMeilleure/IntermediateRepresentation/IntrusiveList.cs
@@ -32,7 +32,7 @@ namespace ARMeilleure.IntermediateRepresentation
/// is not pointer sized.
public IntrusiveList()
{
- if (Unsafe.SizeOf() != IntPtr.Size)
+ if (Unsafe.SizeOf() != nint.Size)
{
throw new ArgumentException("T must be a reference type or a pointer sized struct.");
}
diff --git a/src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs b/src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
index 9b3df8ca4..45695396f 100644
--- a/src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
+++ b/src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
@@ -24,7 +24,7 @@ namespace ARMeilleure.IntermediateRepresentation
{
Debug.Assert(operand.Kind == OperandKind.Memory);
- _data = (Data*)Unsafe.As(ref operand);
+ _data = (Data*)Unsafe.As(ref operand);
}
public Operand BaseAddress
diff --git a/src/ARMeilleure/IntermediateRepresentation/Operation.cs b/src/ARMeilleure/IntermediateRepresentation/Operation.cs
index bc3a71b31..b0dc173af 100644
--- a/src/ARMeilleure/IntermediateRepresentation/Operation.cs
+++ b/src/ARMeilleure/IntermediateRepresentation/Operation.cs
@@ -228,7 +228,7 @@ namespace ARMeilleure.IntermediateRepresentation
public readonly override int GetHashCode()
{
- return HashCode.Combine((IntPtr)_data);
+ return HashCode.Combine((nint)_data);
}
public static bool operator ==(Operation a, Operation b)
diff --git a/src/ARMeilleure/Memory/IJitMemoryBlock.cs b/src/ARMeilleure/Memory/IJitMemoryBlock.cs
index c103fe8d1..59710d1ce 100644
--- a/src/ARMeilleure/Memory/IJitMemoryBlock.cs
+++ b/src/ARMeilleure/Memory/IJitMemoryBlock.cs
@@ -4,7 +4,7 @@ namespace ARMeilleure.Memory
{
public interface IJitMemoryBlock : IDisposable
{
- IntPtr Pointer { get; }
+ nint Pointer { get; }
void Commit(ulong offset, ulong size);
diff --git a/src/ARMeilleure/Memory/IMemoryManager.cs b/src/ARMeilleure/Memory/IMemoryManager.cs
index 46d442655..84d82caf7 100644
--- a/src/ARMeilleure/Memory/IMemoryManager.cs
+++ b/src/ARMeilleure/Memory/IMemoryManager.cs
@@ -6,7 +6,7 @@ namespace ARMeilleure.Memory
{
int AddressSpaceBits { get; }
- IntPtr PageTablePointer { get; }
+ nint PageTablePointer { get; }
MemoryManagerType Type { get; }
diff --git a/src/ARMeilleure/Memory/ReservedRegion.cs b/src/ARMeilleure/Memory/ReservedRegion.cs
index 3870d4c84..a3ebd610d 100644
--- a/src/ARMeilleure/Memory/ReservedRegion.cs
+++ b/src/ARMeilleure/Memory/ReservedRegion.cs
@@ -8,7 +8,7 @@ namespace ARMeilleure.Memory
public IJitMemoryBlock Block { get; }
- public IntPtr Pointer => Block.Pointer;
+ public nint Pointer => Block.Pointer;
private readonly ulong _maxSize;
private readonly ulong _sizeGranularity;
diff --git a/src/ARMeilleure/Native/JitSupportDarwin.cs b/src/ARMeilleure/Native/JitSupportDarwin.cs
index 339460397..39df3878f 100644
--- a/src/ARMeilleure/Native/JitSupportDarwin.cs
+++ b/src/ARMeilleure/Native/JitSupportDarwin.cs
@@ -8,6 +8,6 @@ namespace ARMeilleure.Native
static partial class JitSupportDarwin
{
[LibraryImport("libarmeilleure-jitsupport", EntryPoint = "armeilleure_jit_memcpy")]
- public static partial void Copy(IntPtr dst, IntPtr src, ulong n);
+ public static partial void Copy(nint dst, nint src, ulong n);
}
}
diff --git a/src/ARMeilleure/Signal/NativeSignalHandlerGenerator.cs b/src/ARMeilleure/Signal/NativeSignalHandlerGenerator.cs
index 2ec5bc1b3..1b3689e3f 100644
--- a/src/ARMeilleure/Signal/NativeSignalHandlerGenerator.cs
+++ b/src/ARMeilleure/Signal/NativeSignalHandlerGenerator.cs
@@ -21,7 +21,7 @@ namespace ARMeilleure.Signal
private const uint EXCEPTION_ACCESS_VIOLATION = 0xc0000005;
- private static Operand EmitGenericRegionCheck(EmitterContext context, IntPtr signalStructPtr, Operand faultAddress, Operand isWrite, int rangeStructSize)
+ private static Operand EmitGenericRegionCheck(EmitterContext context, nint signalStructPtr, Operand faultAddress, Operand isWrite, int rangeStructSize)
{
Operand inRegionLocal = context.AllocateLocal(OperandType.I32);
context.Copy(inRegionLocal, Const(0));
@@ -155,7 +155,7 @@ namespace ARMeilleure.Signal
throw new PlatformNotSupportedException();
}
- public static byte[] GenerateUnixSignalHandler(IntPtr signalStructPtr, int rangeStructSize)
+ public static byte[] GenerateUnixSignalHandler(nint signalStructPtr, int rangeStructSize)
{
EmitterContext context = new();
@@ -203,7 +203,7 @@ namespace ARMeilleure.Signal
return Compiler.Compile(cfg, argTypes, OperandType.None, CompilerOptions.HighCq, RuntimeInformation.ProcessArchitecture).Code;
}
- public static byte[] GenerateWindowsSignalHandler(IntPtr signalStructPtr, int rangeStructSize)
+ public static byte[] GenerateWindowsSignalHandler(nint signalStructPtr, int rangeStructSize)
{
EmitterContext context = new();
diff --git a/src/ARMeilleure/Signal/TestMethods.cs b/src/ARMeilleure/Signal/TestMethods.cs
index 0a8b3f5ff..9d11ab183 100644
--- a/src/ARMeilleure/Signal/TestMethods.cs
+++ b/src/ARMeilleure/Signal/TestMethods.cs
@@ -16,7 +16,7 @@ namespace ARMeilleure.Signal
{
public delegate bool DebugPartialUnmap();
public delegate int DebugThreadLocalMapGetOrReserve(int threadId, int initialState);
- public delegate void DebugNativeWriteLoop(IntPtr nativeWriteLoopPtr, IntPtr writePtr);
+ public delegate void DebugNativeWriteLoop(nint nativeWriteLoopPtr, nint writePtr);
public static DebugPartialUnmap GenerateDebugPartialUnmap()
{
@@ -35,7 +35,7 @@ namespace ARMeilleure.Signal
return Compiler.Compile(cfg, argTypes, OperandType.I32, CompilerOptions.HighCq, RuntimeInformation.ProcessArchitecture).Map();
}
- public static DebugThreadLocalMapGetOrReserve GenerateDebugThreadLocalMapGetOrReserve(IntPtr structPtr)
+ public static DebugThreadLocalMapGetOrReserve GenerateDebugThreadLocalMapGetOrReserve(nint structPtr)
{
EmitterContext context = new();
diff --git a/src/ARMeilleure/Signal/WindowsPartialUnmapHandler.cs b/src/ARMeilleure/Signal/WindowsPartialUnmapHandler.cs
index 3bf6a4498..7aa3e4788 100644
--- a/src/ARMeilleure/Signal/WindowsPartialUnmapHandler.cs
+++ b/src/ARMeilleure/Signal/WindowsPartialUnmapHandler.cs
@@ -13,18 +13,18 @@ namespace ARMeilleure.Signal
internal static partial class WindowsPartialUnmapHandler
{
[LibraryImport("kernel32.dll", SetLastError = true, EntryPoint = "LoadLibraryA")]
- private static partial IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)] string lpFileName);
+ private static partial nint LoadLibrary([MarshalAs(UnmanagedType.LPStr)] string lpFileName);
[LibraryImport("kernel32.dll", SetLastError = true)]
- private static partial IntPtr GetProcAddress(IntPtr hModule, [MarshalAs(UnmanagedType.LPStr)] string procName);
+ private static partial nint GetProcAddress(nint hModule, [MarshalAs(UnmanagedType.LPStr)] string procName);
- private static IntPtr _getCurrentThreadIdPtr;
+ private static nint _getCurrentThreadIdPtr;
- public static IntPtr GetCurrentThreadIdFunc()
+ public static nint GetCurrentThreadIdFunc()
{
- if (_getCurrentThreadIdPtr == IntPtr.Zero)
+ if (_getCurrentThreadIdPtr == nint.Zero)
{
- IntPtr handle = LoadLibrary("kernel32.dll");
+ nint handle = LoadLibrary("kernel32.dll");
_getCurrentThreadIdPtr = GetProcAddress(handle, "GetCurrentThreadId");
}
@@ -34,13 +34,13 @@ namespace ARMeilleure.Signal
public static Operand EmitRetryFromAccessViolation(EmitterContext context)
{
- IntPtr partialRemapStatePtr = PartialUnmapState.GlobalState;
- IntPtr localCountsPtr = IntPtr.Add(partialRemapStatePtr, PartialUnmapState.LocalCountsOffset);
+ nint partialRemapStatePtr = PartialUnmapState.GlobalState;
+ nint localCountsPtr = nint.Add(partialRemapStatePtr, PartialUnmapState.LocalCountsOffset);
// Get the lock first.
- EmitNativeReaderLockAcquire(context, IntPtr.Add(partialRemapStatePtr, PartialUnmapState.PartialUnmapLockOffset));
+ EmitNativeReaderLockAcquire(context, nint.Add(partialRemapStatePtr, PartialUnmapState.PartialUnmapLockOffset));
- IntPtr getCurrentThreadId = GetCurrentThreadIdFunc();
+ nint getCurrentThreadId = GetCurrentThreadIdFunc();
Operand threadId = context.Call(Const((ulong)getCurrentThreadId), OperandType.I32);
Operand threadIndex = EmitThreadLocalMapIntGetOrReserve(context, localCountsPtr, threadId, Const(0));
@@ -58,7 +58,7 @@ namespace ARMeilleure.Signal
Operand threadLocalPartialUnmapsPtr = EmitThreadLocalMapIntGetValuePtr(context, localCountsPtr, threadIndex);
Operand threadLocalPartialUnmaps = context.Load(OperandType.I32, threadLocalPartialUnmapsPtr);
- Operand partialUnmapsCount = context.Load(OperandType.I32, Const((ulong)IntPtr.Add(partialRemapStatePtr, PartialUnmapState.PartialUnmapsCountOffset)));
+ Operand partialUnmapsCount = context.Load(OperandType.I32, Const((ulong)nint.Add(partialRemapStatePtr, PartialUnmapState.PartialUnmapsCountOffset)));
context.Copy(retry, context.ICompareNotEqual(threadLocalPartialUnmaps, partialUnmapsCount));
@@ -79,14 +79,14 @@ namespace ARMeilleure.Signal
context.MarkLabel(endLabel);
// Finally, release the lock and return the retry value.
- EmitNativeReaderLockRelease(context, IntPtr.Add(partialRemapStatePtr, PartialUnmapState.PartialUnmapLockOffset));
+ EmitNativeReaderLockRelease(context, nint.Add(partialRemapStatePtr, PartialUnmapState.PartialUnmapLockOffset));
return retry;
}
- public static Operand EmitThreadLocalMapIntGetOrReserve(EmitterContext context, IntPtr threadLocalMapPtr, Operand threadId, Operand initialState)
+ public static Operand EmitThreadLocalMapIntGetOrReserve(EmitterContext context, nint threadLocalMapPtr, Operand threadId, Operand initialState)
{
- Operand idsPtr = Const((ulong)IntPtr.Add(threadLocalMapPtr, ThreadLocalMap.ThreadIdsOffset));
+ Operand idsPtr = Const((ulong)nint.Add(threadLocalMapPtr, ThreadLocalMap.ThreadIdsOffset));
Operand i = context.AllocateLocal(OperandType.I32);
@@ -130,7 +130,7 @@ namespace ARMeilleure.Signal
// If it was 0, then we need to initialize the struct entry and return i.
context.BranchIfFalse(idNot0Label, context.ICompareEqual(existingId2, Const(0)));
- Operand structsPtr = Const((ulong)IntPtr.Add(threadLocalMapPtr, ThreadLocalMap.StructsOffset));
+ Operand structsPtr = Const((ulong)nint.Add(threadLocalMapPtr, ThreadLocalMap.StructsOffset));
Operand structPtr = context.Add(structsPtr, context.SignExtend32(OperandType.I64, offset2));
context.Store(structPtr, initialState);
@@ -149,10 +149,10 @@ namespace ARMeilleure.Signal
return context.Copy(i);
}
- private static Operand EmitThreadLocalMapIntGetValuePtr(EmitterContext context, IntPtr threadLocalMapPtr, Operand index)
+ private static Operand EmitThreadLocalMapIntGetValuePtr(EmitterContext context, nint threadLocalMapPtr, Operand index)
{
Operand offset = context.Multiply(index, Const(sizeof(int)));
- Operand structsPtr = Const((ulong)IntPtr.Add(threadLocalMapPtr, ThreadLocalMap.StructsOffset));
+ Operand structsPtr = Const((ulong)nint.Add(threadLocalMapPtr, ThreadLocalMap.StructsOffset));
return context.Add(structsPtr, context.SignExtend32(OperandType.I64, offset));
}
@@ -170,9 +170,9 @@ namespace ARMeilleure.Signal
context.BranchIfFalse(loop, context.ICompareEqual(initial, replaced));
}
- private static void EmitNativeReaderLockAcquire(EmitterContext context, IntPtr nativeReaderLockPtr)
+ private static void EmitNativeReaderLockAcquire(EmitterContext context, nint nativeReaderLockPtr)
{
- Operand writeLockPtr = Const((ulong)IntPtr.Add(nativeReaderLockPtr, NativeReaderWriterLock.WriteLockOffset));
+ Operand writeLockPtr = Const((ulong)nint.Add(nativeReaderLockPtr, NativeReaderWriterLock.WriteLockOffset));
// Spin until we can acquire the write lock.
Operand spinLabel = Label();
@@ -182,16 +182,16 @@ namespace ARMeilleure.Signal
context.BranchIfTrue(spinLabel, context.CompareAndSwap(writeLockPtr, Const(0), Const(1)));
// Increment reader count.
- EmitAtomicAddI32(context, Const((ulong)IntPtr.Add(nativeReaderLockPtr, NativeReaderWriterLock.ReaderCountOffset)), Const(1));
+ EmitAtomicAddI32(context, Const((ulong)nint.Add(nativeReaderLockPtr, NativeReaderWriterLock.ReaderCountOffset)), Const(1));
// Release write lock.
context.CompareAndSwap(writeLockPtr, Const(1), Const(0));
}
- private static void EmitNativeReaderLockRelease(EmitterContext context, IntPtr nativeReaderLockPtr)
+ private static void EmitNativeReaderLockRelease(EmitterContext context, nint nativeReaderLockPtr)
{
// Decrement reader count.
- EmitAtomicAddI32(context, Const((ulong)IntPtr.Add(nativeReaderLockPtr, NativeReaderWriterLock.ReaderCountOffset)), Const(-1));
+ EmitAtomicAddI32(context, Const((ulong)nint.Add(nativeReaderLockPtr, NativeReaderWriterLock.ReaderCountOffset)), Const(-1));
}
}
}
diff --git a/src/ARMeilleure/State/ExecutionContext.cs b/src/ARMeilleure/State/ExecutionContext.cs
index ce10a591c..314b06b13 100644
--- a/src/ARMeilleure/State/ExecutionContext.cs
+++ b/src/ARMeilleure/State/ExecutionContext.cs
@@ -9,7 +9,7 @@ namespace ARMeilleure.State
private readonly NativeContext _nativeContext;
- internal IntPtr NativeContextPtr => _nativeContext.BasePtr;
+ internal nint NativeContextPtr => _nativeContext.BasePtr;
private bool _interrupted;
diff --git a/src/ARMeilleure/State/NativeContext.cs b/src/ARMeilleure/State/NativeContext.cs
index 5403042ea..628efde41 100644
--- a/src/ARMeilleure/State/NativeContext.cs
+++ b/src/ARMeilleure/State/NativeContext.cs
@@ -27,7 +27,7 @@ namespace ARMeilleure.State
private readonly IJitMemoryBlock _block;
- public IntPtr BasePtr => _block.Pointer;
+ public nint BasePtr => _block.Pointer;
public NativeContext(IJitMemoryAllocator allocator)
{
diff --git a/src/ARMeilleure/Translation/ArmEmitterContext.cs b/src/ARMeilleure/Translation/ArmEmitterContext.cs
index e24074739..5d79171a2 100644
--- a/src/ARMeilleure/Translation/ArmEmitterContext.cs
+++ b/src/ARMeilleure/Translation/ArmEmitterContext.cs
@@ -92,7 +92,7 @@ namespace ARMeilleure.Translation
else
{
int index = Delegates.GetDelegateIndex(info);
- IntPtr funcPtr = Delegates.GetDelegateFuncPtrByIndex(index);
+ nint funcPtr = Delegates.GetDelegateFuncPtrByIndex(index);
OperandType returnType = GetOperandType(info.ReturnType);
diff --git a/src/ARMeilleure/Translation/Cache/JitCache.cs b/src/ARMeilleure/Translation/Cache/JitCache.cs
index e2b5e2d10..cf13cd6cb 100644
--- a/src/ARMeilleure/Translation/Cache/JitCache.cs
+++ b/src/ARMeilleure/Translation/Cache/JitCache.cs
@@ -31,7 +31,7 @@ namespace ARMeilleure.Translation.Cache
[SupportedOSPlatform("windows")]
[LibraryImport("kernel32.dll", SetLastError = true)]
- public static partial IntPtr FlushInstructionCache(IntPtr hProcess, IntPtr lpAddress, UIntPtr dwSize);
+ public static partial nint FlushInstructionCache(nint hProcess, nint lpAddress, nuint dwSize);
public static void Initialize(IJitMemoryAllocator allocator)
{
@@ -65,7 +65,7 @@ namespace ARMeilleure.Translation.Cache
}
}
- public static IntPtr Map(CompiledFunction func)
+ public static nint Map(CompiledFunction func)
{
byte[] code = func.Code;
@@ -75,7 +75,7 @@ namespace ARMeilleure.Translation.Cache
int funcOffset = Allocate(code.Length);
- IntPtr funcPtr = _jitRegion.Pointer + funcOffset;
+ nint funcPtr = _jitRegion.Pointer + funcOffset;
if (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
{
@@ -83,7 +83,7 @@ namespace ARMeilleure.Translation.Cache
{
fixed (byte* codePtr = code)
{
- JitSupportDarwin.Copy(funcPtr, (IntPtr)codePtr, (ulong)code.Length);
+ JitSupportDarwin.Copy(funcPtr, (nint)codePtr, (ulong)code.Length);
}
}
}
@@ -95,7 +95,7 @@ namespace ARMeilleure.Translation.Cache
if (OperatingSystem.IsWindows() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
{
- FlushInstructionCache(Process.GetCurrentProcess().Handle, funcPtr, (UIntPtr)code.Length);
+ FlushInstructionCache(Process.GetCurrentProcess().Handle, funcPtr, (nuint)code.Length);
}
else
{
@@ -109,7 +109,7 @@ namespace ARMeilleure.Translation.Cache
}
}
- public static void Unmap(IntPtr pointer)
+ public static void Unmap(nint pointer)
{
lock (_lock)
{
diff --git a/src/ARMeilleure/Translation/Cache/JitCacheInvalidation.cs b/src/ARMeilleure/Translation/Cache/JitCacheInvalidation.cs
index 3aa2e19f1..6f9c22b4a 100644
--- a/src/ARMeilleure/Translation/Cache/JitCacheInvalidation.cs
+++ b/src/ARMeilleure/Translation/Cache/JitCacheInvalidation.cs
@@ -68,7 +68,7 @@ namespace ARMeilleure.Translation.Cache
}
}
- public void Invalidate(IntPtr basePointer, ulong size)
+ public void Invalidate(nint basePointer, ulong size)
{
if (_needsInvalidation)
{
diff --git a/src/ARMeilleure/Translation/Cache/JitUnwindWindows.cs b/src/ARMeilleure/Translation/Cache/JitUnwindWindows.cs
index 3957a7559..642794188 100644
--- a/src/ARMeilleure/Translation/Cache/JitUnwindWindows.cs
+++ b/src/ARMeilleure/Translation/Cache/JitUnwindWindows.cs
@@ -40,7 +40,7 @@ namespace ARMeilleure.Translation.Cache
PushMachframe = 10,
}
- private unsafe delegate RuntimeFunction* GetRuntimeFunctionCallback(ulong controlPc, IntPtr context);
+ private unsafe delegate RuntimeFunction* GetRuntimeFunctionCallback(ulong controlPc, nint context);
[LibraryImport("kernel32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
@@ -49,7 +49,7 @@ namespace ARMeilleure.Translation.Cache
ulong baseAddress,
uint length,
GetRuntimeFunctionCallback callback,
- IntPtr context,
+ nint context,
[MarshalAs(UnmanagedType.LPWStr)] string outOfProcessCallbackDll);
private static GetRuntimeFunctionCallback _getRuntimeFunctionCallback;
@@ -60,7 +60,7 @@ namespace ARMeilleure.Translation.Cache
private unsafe static UnwindInfo* _unwindInfo;
- public static void InstallFunctionTableHandler(IntPtr codeCachePointer, uint codeCacheLength, IntPtr workBufferPtr)
+ public static void InstallFunctionTableHandler(nint codeCachePointer, uint codeCacheLength, nint workBufferPtr)
{
ulong codeCachePtr = (ulong)codeCachePointer.ToInt64();
@@ -91,7 +91,7 @@ namespace ARMeilleure.Translation.Cache
}
}
- private static unsafe RuntimeFunction* FunctionTableHandler(ulong controlPc, IntPtr context)
+ private static unsafe RuntimeFunction* FunctionTableHandler(ulong controlPc, nint context)
{
int offset = (int)((long)controlPc - context.ToInt64());
diff --git a/src/ARMeilleure/Translation/DelegateInfo.cs b/src/ARMeilleure/Translation/DelegateInfo.cs
index 706625437..d3b535de1 100644
--- a/src/ARMeilleure/Translation/DelegateInfo.cs
+++ b/src/ARMeilleure/Translation/DelegateInfo.cs
@@ -8,9 +8,9 @@ namespace ARMeilleure.Translation
private readonly Delegate _dlg; // Ensure that this delegate will not be garbage collected.
#pragma warning restore IDE0052
- public IntPtr FuncPtr { get; }
+ public nint FuncPtr { get; }
- public DelegateInfo(Delegate dlg, IntPtr funcPtr)
+ public DelegateInfo(Delegate dlg, nint funcPtr)
{
_dlg = dlg;
FuncPtr = funcPtr;
diff --git a/src/ARMeilleure/Translation/Delegates.cs b/src/ARMeilleure/Translation/Delegates.cs
index 66412b8e6..d8c1cfd58 100644
--- a/src/ARMeilleure/Translation/Delegates.cs
+++ b/src/ARMeilleure/Translation/Delegates.cs
@@ -9,7 +9,7 @@ namespace ARMeilleure.Translation
{
static class Delegates
{
- public static bool TryGetDelegateFuncPtrByIndex(int index, out IntPtr funcPtr)
+ public static bool TryGetDelegateFuncPtrByIndex(int index, out nint funcPtr)
{
if (index >= 0 && index < _delegates.Count)
{
@@ -25,7 +25,7 @@ namespace ARMeilleure.Translation
}
}
- public static IntPtr GetDelegateFuncPtrByIndex(int index)
+ public static nint GetDelegateFuncPtrByIndex(int index)
{
if (index < 0 || index >= _delegates.Count)
{
@@ -35,7 +35,7 @@ namespace ARMeilleure.Translation
return _delegates.Values[index].FuncPtr; // O(1).
}
- public static IntPtr GetDelegateFuncPtr(MethodInfo info)
+ public static nint GetDelegateFuncPtr(MethodInfo info)
{
ArgumentNullException.ThrowIfNull(info);
@@ -65,7 +65,7 @@ namespace ARMeilleure.Translation
return index;
}
- private static void SetDelegateInfo(Delegate dlg, IntPtr funcPtr)
+ private static void SetDelegateInfo(Delegate dlg, nint funcPtr)
{
string key = GetKey(dlg.Method);
diff --git a/src/ARMeilleure/Translation/DispatcherFunction.cs b/src/ARMeilleure/Translation/DispatcherFunction.cs
index 649fa0f50..f8b9dc31e 100644
--- a/src/ARMeilleure/Translation/DispatcherFunction.cs
+++ b/src/ARMeilleure/Translation/DispatcherFunction.cs
@@ -2,6 +2,6 @@ using System;
namespace ARMeilleure.Translation
{
- delegate void DispatcherFunction(IntPtr nativeContext, ulong startAddress);
- delegate ulong WrapperFunction(IntPtr nativeContext, ulong startAddress);
+ delegate void DispatcherFunction(nint nativeContext, ulong startAddress);
+ delegate ulong WrapperFunction(nint nativeContext, ulong startAddress);
}
diff --git a/src/ARMeilleure/Translation/EmitterContext.cs b/src/ARMeilleure/Translation/EmitterContext.cs
index 88bfe1335..e2d860f82 100644
--- a/src/ARMeilleure/Translation/EmitterContext.cs
+++ b/src/ARMeilleure/Translation/EmitterContext.cs
@@ -97,7 +97,7 @@ namespace ARMeilleure.Translation
public virtual Operand Call(MethodInfo info, params Operand[] callArgs)
{
- IntPtr funcPtr = Delegates.GetDelegateFuncPtr(info);
+ nint funcPtr = Delegates.GetDelegateFuncPtr(info);
OperandType returnType = GetOperandType(info.ReturnType);
diff --git a/src/ARMeilleure/Translation/GuestFunction.cs b/src/ARMeilleure/Translation/GuestFunction.cs
index 6414d6bd0..5c7c733f9 100644
--- a/src/ARMeilleure/Translation/GuestFunction.cs
+++ b/src/ARMeilleure/Translation/GuestFunction.cs
@@ -2,5 +2,5 @@ using System;
namespace ARMeilleure.Translation
{
- delegate ulong GuestFunction(IntPtr nativeContextPtr);
+ delegate ulong GuestFunction(nint nativeContextPtr);
}
diff --git a/src/ARMeilleure/Translation/PTC/Ptc.cs b/src/ARMeilleure/Translation/PTC/Ptc.cs
index fa178eace..2fecbc3d9 100644
--- a/src/ARMeilleure/Translation/PTC/Ptc.cs
+++ b/src/ARMeilleure/Translation/PTC/Ptc.cs
@@ -268,11 +268,11 @@ namespace ARMeilleure.Translation.PTC
return false;
}
- IntPtr intPtr = IntPtr.Zero;
+ nint intPtr = nint.Zero;
try
{
- intPtr = Marshal.AllocHGlobal(new IntPtr(outerHeader.UncompressedStreamSize));
+ intPtr = Marshal.AllocHGlobal(new nint(outerHeader.UncompressedStreamSize));
using UnmanagedMemoryStream stream = new((byte*)intPtr.ToPointer(), outerHeader.UncompressedStreamSize, outerHeader.UncompressedStreamSize, FileAccess.ReadWrite);
try
@@ -373,7 +373,7 @@ namespace ARMeilleure.Translation.PTC
}
finally
{
- if (intPtr != IntPtr.Zero)
+ if (intPtr != nint.Zero)
{
Marshal.FreeHGlobal(intPtr);
}
@@ -455,11 +455,11 @@ namespace ARMeilleure.Translation.PTC
outerHeader.SetHeaderHash();
- IntPtr intPtr = IntPtr.Zero;
+ nint intPtr = nint.Zero;
try
{
- intPtr = Marshal.AllocHGlobal(new IntPtr(outerHeader.UncompressedStreamSize));
+ intPtr = Marshal.AllocHGlobal(new nint(outerHeader.UncompressedStreamSize));
using UnmanagedMemoryStream stream = new((byte*)intPtr.ToPointer(), outerHeader.UncompressedStreamSize, outerHeader.UncompressedStreamSize, FileAccess.ReadWrite);
stream.Seek((long)Unsafe.SizeOf(), SeekOrigin.Begin);
@@ -513,7 +513,7 @@ namespace ARMeilleure.Translation.PTC
}
finally
{
- if (intPtr != IntPtr.Zero)
+ if (intPtr != nint.Zero)
{
Marshal.FreeHGlobal(intPtr);
}
@@ -664,7 +664,7 @@ namespace ARMeilleure.Translation.PTC
foreach (RelocEntry relocEntry in relocEntries)
{
- IntPtr? imm = null;
+ nint? imm = null;
Symbol symbol = relocEntry.Symbol;
if (symbol.Type == SymbolType.FunctionTable)
@@ -675,7 +675,7 @@ namespace ARMeilleure.Translation.PTC
{
unsafe
{
- imm = (IntPtr)Unsafe.AsPointer(ref translator.FunctionTable.GetValue(guestAddress));
+ imm = (nint)Unsafe.AsPointer(ref translator.FunctionTable.GetValue(guestAddress));
}
}
}
@@ -683,7 +683,7 @@ namespace ARMeilleure.Translation.PTC
{
int index = (int)symbol.Value;
- if (Delegates.TryGetDelegateFuncPtrByIndex(index, out IntPtr funcPtr))
+ if (Delegates.TryGetDelegateFuncPtrByIndex(index, out nint funcPtr))
{
imm = funcPtr;
}
@@ -698,7 +698,7 @@ namespace ARMeilleure.Translation.PTC
unsafe
{
- imm = (IntPtr)Unsafe.AsPointer(ref callCounter.Value);
+ imm = (nint)Unsafe.AsPointer(ref callCounter.Value);
}
}
else if (symbol == DispatchStubSymbol)
@@ -744,7 +744,7 @@ namespace ARMeilleure.Translation.PTC
bool highCq)
{
var cFunc = new CompiledFunction(code, unwindInfo, RelocInfo.Empty);
- var gFunc = cFunc.MapWithPointer(out IntPtr gFuncPointer);
+ var gFunc = cFunc.MapWithPointer(out nint gFuncPointer);
return new TranslatedFunction(gFunc, gFuncPointer, callCounter, guestSize, highCq);
}
diff --git a/src/ARMeilleure/Translation/TranslatedFunction.cs b/src/ARMeilleure/Translation/TranslatedFunction.cs
index 1446c254a..3d7ae9ffe 100644
--- a/src/ARMeilleure/Translation/TranslatedFunction.cs
+++ b/src/ARMeilleure/Translation/TranslatedFunction.cs
@@ -7,12 +7,12 @@ namespace ARMeilleure.Translation
{
private readonly GuestFunction _func; // Ensure that this delegate will not be garbage collected.
- public IntPtr FuncPointer { get; }
+ public nint FuncPointer { get; }
public Counter CallCounter { get; }
public ulong GuestSize { get; }
public bool HighCq { get; }
- public TranslatedFunction(GuestFunction func, IntPtr funcPointer, Counter callCounter, ulong guestSize, bool highCq)
+ public TranslatedFunction(GuestFunction func, nint funcPointer, Counter callCounter, ulong guestSize, bool highCq)
{
_func = func;
FuncPointer = funcPointer;
diff --git a/src/ARMeilleure/Translation/Translator.cs b/src/ARMeilleure/Translation/Translator.cs
index 014b12035..24fbd7621 100644
--- a/src/ARMeilleure/Translation/Translator.cs
+++ b/src/ARMeilleure/Translation/Translator.cs
@@ -298,7 +298,7 @@ namespace ARMeilleure.Translation
_ptc.WriteCompiledFunction(address, funcSize, hash, highCq, compiledFunc);
}
- GuestFunction func = compiledFunc.MapWithPointer(out IntPtr funcPointer);
+ GuestFunction func = compiledFunc.MapWithPointer(out nint funcPointer);
Allocators.ResetAll();
diff --git a/src/ARMeilleure/Translation/TranslatorStubs.cs b/src/ARMeilleure/Translation/TranslatorStubs.cs
index d80823a8b..364cca13c 100644
--- a/src/ARMeilleure/Translation/TranslatorStubs.cs
+++ b/src/ARMeilleure/Translation/TranslatorStubs.cs
@@ -15,12 +15,12 @@ namespace ARMeilleure.Translation
///
class TranslatorStubs : IDisposable
{
- private readonly Lazy _slowDispatchStub;
+ private readonly Lazy _slowDispatchStub;
private bool _disposed;
private readonly AddressTable _functionTable;
- private readonly Lazy _dispatchStub;
+ private readonly Lazy _dispatchStub;
private readonly Lazy _dispatchLoop;
private readonly Lazy _contextWrapper;
@@ -28,7 +28,7 @@ namespace ARMeilleure.Translation
/// Gets the dispatch stub.
///
/// instance was disposed
- public IntPtr DispatchStub
+ public nint DispatchStub
{
get
{
@@ -42,7 +42,7 @@ namespace ARMeilleure.Translation
/// Gets the slow dispatch stub.
///
/// instance was disposed
- public IntPtr SlowDispatchStub
+ public nint SlowDispatchStub
{
get
{
@@ -140,7 +140,7 @@ namespace ARMeilleure.Translation
/// Generates a .
///
/// Generated
- private IntPtr GenerateDispatchStub()
+ private nint GenerateDispatchStub()
{
var context = new EmitterContext();
@@ -198,7 +198,7 @@ namespace ARMeilleure.Translation
/// Generates a .
///
/// Generated
- private IntPtr GenerateSlowDispatchStub()
+ private nint GenerateSlowDispatchStub()
{
var context = new EmitterContext();
diff --git a/src/ARMeilleure/Translation/TranslatorTestMethods.cs b/src/ARMeilleure/Translation/TranslatorTestMethods.cs
index 8cc7a3cf8..186780daa 100644
--- a/src/ARMeilleure/Translation/TranslatorTestMethods.cs
+++ b/src/ARMeilleure/Translation/TranslatorTestMethods.cs
@@ -9,7 +9,7 @@ namespace ARMeilleure.Translation
{
public static class TranslatorTestMethods
{
- public delegate int FpFlagsPInvokeTest(IntPtr managedMethod);
+ public delegate int FpFlagsPInvokeTest(nint managedMethod);
private static bool SetPlatformFtz(EmitterContext context, bool ftz)
{
diff --git a/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs b/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
index e39bfe549..acd1582ec 100644
--- a/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
+++ b/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
@@ -26,7 +26,7 @@ namespace Ryujinx.Audio.Backends.SDL2
// NOTE: We use a DllImport here because of marshaling issue for spec.
#pragma warning disable SYSLIB1054
[DllImport("SDL2")]
- private static extern int SDL_GetDefaultAudioInfo(IntPtr name, out SDL_AudioSpec spec, int isCapture);
+ private static extern int SDL_GetDefaultAudioInfo(nint name, out SDL_AudioSpec spec, int isCapture);
#pragma warning restore SYSLIB1054
public SDL2HardwareDeviceDriver()
@@ -37,7 +37,7 @@ namespace Ryujinx.Audio.Backends.SDL2
SDL2Driver.Instance.Initialize();
- int res = SDL_GetDefaultAudioInfo(IntPtr.Zero, out var spec, 0);
+ int res = SDL_GetDefaultAudioInfo(nint.Zero, out var spec, 0);
if (res != 0)
{
@@ -136,7 +136,7 @@ namespace Ryujinx.Audio.Backends.SDL2
desired.callback = callback;
- uint device = SDL_OpenAudioDevice(IntPtr.Zero, 0, ref desired, out SDL_AudioSpec got, 0);
+ uint device = SDL_OpenAudioDevice(nint.Zero, 0, ref desired, out SDL_AudioSpec got, 0);
if (device == 0)
{
diff --git a/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs b/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
index 4eb75a578..51cd43c55 100644
--- a/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
+++ b/src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
@@ -72,7 +72,7 @@ namespace Ryujinx.Audio.Backends.SDL2
}
}
- private unsafe void Update(IntPtr userdata, IntPtr stream, int streamLength)
+ private unsafe void Update(nint userdata, nint stream, int streamLength)
{
Span streamSpan = new((void*)stream, streamLength);
@@ -97,7 +97,7 @@ namespace Ryujinx.Audio.Backends.SDL2
fixed (byte* p = samples)
{
- IntPtr pStreamSrc = (IntPtr)p;
+ nint pStreamSrc = (nint)p;
// Zero the dest buffer
streamSpan.Clear();
diff --git a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIo.cs b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIo.cs
index 7fdb1fc04..9decd79fc 100644
--- a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIo.cs
+++ b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIo.cs
@@ -10,41 +10,41 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
private const string LibraryName = "libsoundio";
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void OnDeviceChangeNativeDelegate(IntPtr ctx);
+ public delegate void OnDeviceChangeNativeDelegate(nint ctx);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void OnBackendDisconnectedDelegate(IntPtr ctx, SoundIoError err);
+ public delegate void OnBackendDisconnectedDelegate(nint ctx, SoundIoError err);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void OnEventsSignalDelegate(IntPtr ctx);
+ public delegate void OnEventsSignalDelegate(nint ctx);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void EmitRtPrioWarningDelegate();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void JackCallbackDelegate(IntPtr msg);
+ public delegate void JackCallbackDelegate(nint msg);
[StructLayout(LayoutKind.Sequential)]
public struct SoundIoStruct
{
- public IntPtr UserData;
- public IntPtr OnDeviceChange;
- public IntPtr OnBackendDisconnected;
- public IntPtr OnEventsSignal;
+ public nint UserData;
+ public nint OnDeviceChange;
+ public nint OnBackendDisconnected;
+ public nint OnEventsSignal;
public SoundIoBackend CurrentBackend;
- public IntPtr ApplicationName;
- public IntPtr EmitRtPrioWarning;
- public IntPtr JackInfoCallback;
- public IntPtr JackErrorCallback;
+ public nint ApplicationName;
+ public nint EmitRtPrioWarning;
+ public nint JackInfoCallback;
+ public nint JackErrorCallback;
}
public struct SoundIoChannelLayout
{
- public IntPtr Name;
+ public nint Name;
public int ChannelCount;
public Array24 Channels;
- public static IntPtr GetDefault(int channelCount)
+ public static nint GetDefault(int channelCount)
{
return soundio_channel_layout_get_default(channelCount);
}
@@ -63,17 +63,17 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
public struct SoundIoDevice
{
- public IntPtr SoundIo;
- public IntPtr Id;
- public IntPtr Name;
+ public nint SoundIo;
+ public nint Id;
+ public nint Name;
public SoundIoDeviceAim Aim;
- public IntPtr Layouts;
+ public nint Layouts;
public int LayoutCount;
public SoundIoChannelLayout CurrentLayout;
- public IntPtr Formats;
+ public nint Formats;
public int FormatCount;
public SoundIoFormat CurrentFormat;
- public IntPtr SampleRates;
+ public nint SampleRates;
public int SampleRateCount;
public int SampleRateCurrent;
public double SoftwareLatencyMin;
@@ -86,17 +86,17 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
public struct SoundIoOutStream
{
- public IntPtr Device;
+ public nint Device;
public SoundIoFormat Format;
public int SampleRate;
public SoundIoChannelLayout Layout;
public double SoftwareLatency;
public float Volume;
- public IntPtr UserData;
- public IntPtr WriteCallback;
- public IntPtr UnderflowCallback;
- public IntPtr ErrorCallback;
- public IntPtr Name;
+ public nint UserData;
+ public nint WriteCallback;
+ public nint UnderflowCallback;
+ public nint ErrorCallback;
+ public nint Name;
public bool NonTerminalHint;
public int BytesPerFrame;
public int BytesPerSample;
@@ -105,74 +105,74 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
public struct SoundIoChannelArea
{
- public IntPtr Pointer;
+ public nint Pointer;
public int Step;
}
[LibraryImport(LibraryName)]
- internal static partial IntPtr soundio_create();
+ internal static partial nint soundio_create();
[LibraryImport(LibraryName)]
- internal static partial SoundIoError soundio_connect(IntPtr ctx);
+ internal static partial SoundIoError soundio_connect(nint ctx);
[LibraryImport(LibraryName)]
- internal static partial void soundio_disconnect(IntPtr ctx);
+ internal static partial void soundio_disconnect(nint ctx);
[LibraryImport(LibraryName)]
- internal static partial void soundio_flush_events(IntPtr ctx);
+ internal static partial void soundio_flush_events(nint ctx);
[LibraryImport(LibraryName)]
- internal static partial int soundio_output_device_count(IntPtr ctx);
+ internal static partial int soundio_output_device_count(nint ctx);
[LibraryImport(LibraryName)]
- internal static partial int soundio_default_output_device_index(IntPtr ctx);
+ internal static partial int soundio_default_output_device_index(nint ctx);
[LibraryImport(LibraryName)]
- internal static partial IntPtr soundio_get_output_device(IntPtr ctx, int index);
+ internal static partial nint soundio_get_output_device(nint ctx, int index);
[LibraryImport(LibraryName)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static partial bool soundio_device_supports_format(IntPtr devCtx, SoundIoFormat format);
+ internal static partial bool soundio_device_supports_format(nint devCtx, SoundIoFormat format);
[LibraryImport(LibraryName)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static partial bool soundio_device_supports_layout(IntPtr devCtx, IntPtr layout);
+ internal static partial bool soundio_device_supports_layout(nint devCtx, nint layout);
[LibraryImport(LibraryName)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static partial bool soundio_device_supports_sample_rate(IntPtr devCtx, int sampleRate);
+ internal static partial bool soundio_device_supports_sample_rate(nint devCtx, int sampleRate);
[LibraryImport(LibraryName)]
- internal static partial IntPtr soundio_outstream_create(IntPtr devCtx);
+ internal static partial nint soundio_outstream_create(nint devCtx);
[LibraryImport(LibraryName)]
- internal static partial SoundIoError soundio_outstream_open(IntPtr outStreamCtx);
+ internal static partial SoundIoError soundio_outstream_open(nint outStreamCtx);
[LibraryImport(LibraryName)]
- internal static partial SoundIoError soundio_outstream_start(IntPtr outStreamCtx);
+ internal static partial SoundIoError soundio_outstream_start(nint outStreamCtx);
[LibraryImport(LibraryName)]
- internal static partial SoundIoError soundio_outstream_begin_write(IntPtr outStreamCtx, IntPtr areas, IntPtr frameCount);
+ internal static partial SoundIoError soundio_outstream_begin_write(nint outStreamCtx, nint areas, nint frameCount);
[LibraryImport(LibraryName)]
- internal static partial SoundIoError soundio_outstream_end_write(IntPtr outStreamCtx);
+ internal static partial SoundIoError soundio_outstream_end_write(nint outStreamCtx);
[LibraryImport(LibraryName)]
- internal static partial SoundIoError soundio_outstream_pause(IntPtr devCtx, [MarshalAs(UnmanagedType.Bool)] bool pause);
+ internal static partial SoundIoError soundio_outstream_pause(nint devCtx, [MarshalAs(UnmanagedType.Bool)] bool pause);
[LibraryImport(LibraryName)]
- internal static partial SoundIoError soundio_outstream_set_volume(IntPtr devCtx, double volume);
+ internal static partial SoundIoError soundio_outstream_set_volume(nint devCtx, double volume);
[LibraryImport(LibraryName)]
- internal static partial void soundio_outstream_destroy(IntPtr streamCtx);
+ internal static partial void soundio_outstream_destroy(nint streamCtx);
[LibraryImport(LibraryName)]
- internal static partial void soundio_destroy(IntPtr ctx);
+ internal static partial void soundio_destroy(nint ctx);
[LibraryImport(LibraryName)]
- internal static partial IntPtr soundio_channel_layout_get_default(int channelCount);
+ internal static partial nint soundio_channel_layout_get_default(int channelCount);
[LibraryImport(LibraryName)]
- internal static partial IntPtr soundio_strerror(SoundIoError err);
+ internal static partial nint soundio_strerror(SoundIoError err);
}
}
diff --git a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoContext.cs b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoContext.cs
index f2e91fcd7..a881e8ffe 100644
--- a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoContext.cs
+++ b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoContext.cs
@@ -8,13 +8,13 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
{
public class SoundIoContext : IDisposable
{
- private IntPtr _context;
+ private nint _context;
private Action _onBackendDisconnect;
private OnBackendDisconnectedDelegate _onBackendDisconnectNative;
- public IntPtr Context => _context;
+ public nint Context => _context;
- internal SoundIoContext(IntPtr context)
+ internal SoundIoContext(nint context)
{
_context = context;
_onBackendDisconnect = null;
@@ -60,9 +60,9 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
public SoundIoDeviceContext GetOutputDevice(int index)
{
- IntPtr deviceContext = soundio_get_output_device(_context, index);
+ nint deviceContext = soundio_get_output_device(_context, index);
- if (deviceContext == IntPtr.Zero)
+ if (deviceContext == nint.Zero)
{
return null;
}
@@ -72,9 +72,9 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
public static SoundIoContext Create()
{
- IntPtr context = soundio_create();
+ nint context = soundio_create();
- if (context == IntPtr.Zero)
+ if (context == nint.Zero)
{
return null;
}
@@ -84,9 +84,9 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
protected virtual void Dispose(bool disposing)
{
- IntPtr currentContext = Interlocked.Exchange(ref _context, IntPtr.Zero);
+ nint currentContext = Interlocked.Exchange(ref _context, nint.Zero);
- if (currentContext != IntPtr.Zero)
+ if (currentContext != nint.Zero)
{
soundio_destroy(currentContext);
}
diff --git a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoDeviceContext.cs b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoDeviceContext.cs
index 7923e9b17..efea52b35 100644
--- a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoDeviceContext.cs
+++ b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoDeviceContext.cs
@@ -7,11 +7,11 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
{
public class SoundIoDeviceContext
{
- private readonly IntPtr _context;
+ private readonly nint _context;
- public IntPtr Context => _context;
+ public nint Context => _context;
- internal SoundIoDeviceContext(IntPtr context)
+ internal SoundIoDeviceContext(nint context)
{
_context = context;
}
@@ -36,9 +36,9 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
public SoundIoOutStreamContext CreateOutStream()
{
- IntPtr context = soundio_outstream_create(_context);
+ nint context = soundio_outstream_create(_context);
- if (context == IntPtr.Zero)
+ if (context == nint.Zero)
{
return null;
}
diff --git a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoOutStreamContext.cs b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoOutStreamContext.cs
index 4148ea0dd..b1823a074 100644
--- a/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoOutStreamContext.cs
+++ b/src/Ryujinx.Audio.Backends.SoundIo/Native/SoundIoOutStreamContext.cs
@@ -8,19 +8,19 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
public class SoundIoOutStreamContext : IDisposable
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- private unsafe delegate void WriteCallbackDelegate(IntPtr ctx, int frameCountMin, int frameCountMax);
+ private unsafe delegate void WriteCallbackDelegate(nint ctx, int frameCountMin, int frameCountMax);
- private IntPtr _context;
- private IntPtr _nameStored;
+ private nint _context;
+ private nint _nameStored;
private Action _writeCallback;
private WriteCallbackDelegate _writeCallbackNative;
- public IntPtr Context => _context;
+ public nint Context => _context;
- internal SoundIoOutStreamContext(IntPtr context)
+ internal SoundIoOutStreamContext(nint context)
{
_context = context;
- _nameStored = IntPtr.Zero;
+ _nameStored = nint.Zero;
_writeCallback = null;
_writeCallbackNative = null;
}
@@ -40,7 +40,7 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
{
var context = GetOutContext();
- if (_nameStored != IntPtr.Zero && context.Name == _nameStored)
+ if (_nameStored != nint.Zero && context.Name == _nameStored)
{
Marshal.FreeHGlobal(_nameStored);
}
@@ -124,14 +124,14 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
public Span BeginWrite(ref int frameCount)
{
- IntPtr arenas = default;
+ nint arenas = default;
int nativeFrameCount = frameCount;
unsafe
{
var frameCountPtr = &nativeFrameCount;
var arenasPtr = &arenas;
- CheckError(soundio_outstream_begin_write(_context, (IntPtr)arenasPtr, (IntPtr)frameCountPtr));
+ CheckError(soundio_outstream_begin_write(_context, (nint)arenasPtr, (nint)frameCountPtr));
frameCount = *frameCountPtr;
@@ -143,10 +143,10 @@ namespace Ryujinx.Audio.Backends.SoundIo.Native
protected virtual void Dispose(bool disposing)
{
- if (_context != IntPtr.Zero)
+ if (_context != nint.Zero)
{
soundio_outstream_destroy(_context);
- _context = IntPtr.Zero;
+ _context = nint.Zero;
}
}
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/Command/CommandList.cs b/src/Ryujinx.Audio/Renderer/Dsp/Command/CommandList.cs
index 3fe106ddf..ba19330b6 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/Command/CommandList.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/Command/CommandList.cs
@@ -64,11 +64,11 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public unsafe IntPtr GetBufferPointer(int index)
+ public unsafe nint GetBufferPointer(int index)
{
if (index >= 0 && index < _buffersEntryCount)
{
- return (IntPtr)((float*)_buffersMemoryHandle.Pointer + index * _sampleCount);
+ return (nint)((float*)_buffersMemoryHandle.Pointer + index * _sampleCount);
}
throw new ArgumentOutOfRangeException(nameof(index), index, null);
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/Command/CompressorCommand.cs b/src/Ryujinx.Audio/Renderer/Dsp/Command/CompressorCommand.cs
index 33f61e6a5..c6c0956a6 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/Command/CompressorCommand.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/Command/CompressorCommand.cs
@@ -82,8 +82,8 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
statistics.Reset(_parameter.ChannelCount);
}
- Span inputBuffers = stackalloc IntPtr[_parameter.ChannelCount];
- Span outputBuffers = stackalloc IntPtr[_parameter.ChannelCount];
+ Span inputBuffers = stackalloc nint[_parameter.ChannelCount];
+ Span outputBuffers = stackalloc nint[_parameter.ChannelCount];
Span channelInput = stackalloc float[_parameter.ChannelCount];
ExponentialMovingAverage inputMovingAverage = state.InputMovingAverage;
float unknown4 = state.Unknown4;
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/Command/DelayCommand.cs b/src/Ryujinx.Audio/Renderer/Dsp/Command/DelayCommand.cs
index 6fa3777f4..21cf69504 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/Command/DelayCommand.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/Command/DelayCommand.cs
@@ -77,7 +77,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
- private unsafe void ProcessDelayStereo(ref DelayState state, Span outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private unsafe void ProcessDelayStereo(ref DelayState state, Span outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
const ushort ChannelCount = 2;
@@ -114,7 +114,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
- private unsafe void ProcessDelayQuadraphonic(ref DelayState state, Span outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private unsafe void ProcessDelayQuadraphonic(ref DelayState state, Span outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
const ushort ChannelCount = 4;
@@ -160,7 +160,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
- private unsafe void ProcessDelaySurround(ref DelayState state, Span outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private unsafe void ProcessDelaySurround(ref DelayState state, Span outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
const ushort ChannelCount = 6;
@@ -219,8 +219,8 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
if (IsEffectEnabled && Parameter.IsChannelCountValid())
{
- Span inputBuffers = stackalloc IntPtr[Parameter.ChannelCount];
- Span outputBuffers = stackalloc IntPtr[Parameter.ChannelCount];
+ Span inputBuffers = stackalloc nint[Parameter.ChannelCount];
+ Span outputBuffers = stackalloc nint[Parameter.ChannelCount];
for (int i = 0; i < Parameter.ChannelCount; i++)
{
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/Command/LimiterCommandVersion1.cs b/src/Ryujinx.Audio/Renderer/Dsp/Command/LimiterCommandVersion1.cs
index 06e932199..4e7f67e78 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/Command/LimiterCommandVersion1.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/Command/LimiterCommandVersion1.cs
@@ -70,8 +70,8 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
if (IsEffectEnabled && _parameter.IsChannelCountValid())
{
- Span inputBuffers = stackalloc IntPtr[_parameter.ChannelCount];
- Span outputBuffers = stackalloc IntPtr[_parameter.ChannelCount];
+ Span inputBuffers = stackalloc nint[_parameter.ChannelCount];
+ Span outputBuffers = stackalloc nint[_parameter.ChannelCount];
for (int i = 0; i < _parameter.ChannelCount; i++)
{
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/Command/LimiterCommandVersion2.cs b/src/Ryujinx.Audio/Renderer/Dsp/Command/LimiterCommandVersion2.cs
index ed0538c06..b0032c5b7 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/Command/LimiterCommandVersion2.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/Command/LimiterCommandVersion2.cs
@@ -88,8 +88,8 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
statistics.Reset();
}
- Span inputBuffers = stackalloc IntPtr[_parameter.ChannelCount];
- Span outputBuffers = stackalloc IntPtr[_parameter.ChannelCount];
+ Span inputBuffers = stackalloc nint[_parameter.ChannelCount];
+ Span outputBuffers = stackalloc nint[_parameter.ChannelCount];
for (int i = 0; i < _parameter.ChannelCount; i++)
{
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/Command/Reverb3dCommand.cs b/src/Ryujinx.Audio/Renderer/Dsp/Command/Reverb3dCommand.cs
index 8cdd4843b..58023ac9d 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/Command/Reverb3dCommand.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/Command/Reverb3dCommand.cs
@@ -71,30 +71,30 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ProcessReverb3dMono(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private void ProcessReverb3dMono(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
ProcessReverb3dGeneric(ref state, outputBuffers, inputBuffers, sampleCount, _outputEarlyIndicesTableMono, _targetEarlyDelayLineIndicesTableMono, _targetOutputFeedbackIndicesTableMono);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ProcessReverb3dStereo(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private void ProcessReverb3dStereo(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
ProcessReverb3dGeneric(ref state, outputBuffers, inputBuffers, sampleCount, _outputEarlyIndicesTableStereo, _targetEarlyDelayLineIndicesTableStereo, _targetOutputFeedbackIndicesTableStereo);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ProcessReverb3dQuadraphonic(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private void ProcessReverb3dQuadraphonic(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
ProcessReverb3dGeneric(ref state, outputBuffers, inputBuffers, sampleCount, _outputEarlyIndicesTableQuadraphonic, _targetEarlyDelayLineIndicesTableQuadraphonic, _targetOutputFeedbackIndicesTableQuadraphonic);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ProcessReverb3dSurround(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private void ProcessReverb3dSurround(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
ProcessReverb3dGeneric(ref state, outputBuffers, inputBuffers, sampleCount, _outputEarlyIndicesTableSurround, _targetEarlyDelayLineIndicesTableSurround, _targetOutputFeedbackIndicesTableSurround);
}
- private unsafe void ProcessReverb3dGeneric(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount, ReadOnlySpan outputEarlyIndicesTable, ReadOnlySpan targetEarlyDelayLineIndicesTable, ReadOnlySpan targetOutputFeedbackIndicesTable)
+ private unsafe void ProcessReverb3dGeneric(ref Reverb3dState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount, ReadOnlySpan outputEarlyIndicesTable, ReadOnlySpan targetEarlyDelayLineIndicesTable, ReadOnlySpan targetOutputFeedbackIndicesTable)
{
const int DelayLineSampleIndexOffset = 1;
@@ -193,8 +193,8 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
if (IsEffectEnabled && Parameter.IsChannelCountValid())
{
- Span inputBuffers = stackalloc IntPtr[Parameter.ChannelCount];
- Span outputBuffers = stackalloc IntPtr[Parameter.ChannelCount];
+ Span inputBuffers = stackalloc nint[Parameter.ChannelCount];
+ Span outputBuffers = stackalloc nint[Parameter.ChannelCount];
for (int i = 0; i < Parameter.ChannelCount; i++)
{
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/Command/ReverbCommand.cs b/src/Ryujinx.Audio/Renderer/Dsp/Command/ReverbCommand.cs
index 874eb8e8b..204570cec 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/Command/ReverbCommand.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/Command/ReverbCommand.cs
@@ -77,7 +77,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ProcessReverbMono(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private void ProcessReverbMono(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
ProcessReverbGeneric(
ref state,
@@ -91,7 +91,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ProcessReverbStereo(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private void ProcessReverbStereo(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
ProcessReverbGeneric(
ref state,
@@ -105,7 +105,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ProcessReverbQuadraphonic(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private void ProcessReverbQuadraphonic(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
ProcessReverbGeneric(
ref state,
@@ -119,7 +119,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private void ProcessReverbSurround(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
+ private void ProcessReverbSurround(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount)
{
ProcessReverbGeneric(
ref state,
@@ -132,7 +132,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
_outputIndicesTableSurround);
}
- private unsafe void ProcessReverbGeneric(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount, ReadOnlySpan outputEarlyIndicesTable, ReadOnlySpan targetEarlyDelayLineIndicesTable, ReadOnlySpan targetOutputFeedbackIndicesTable, ReadOnlySpan outputIndicesTable)
+ private unsafe void ProcessReverbGeneric(ref ReverbState state, ReadOnlySpan outputBuffers, ReadOnlySpan inputBuffers, uint sampleCount, ReadOnlySpan outputEarlyIndicesTable, ReadOnlySpan targetEarlyDelayLineIndicesTable, ReadOnlySpan targetOutputFeedbackIndicesTable, ReadOnlySpan outputIndicesTable)
{
bool isSurround = Parameter.ChannelCount == 6;
@@ -223,8 +223,8 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command
if (IsEffectEnabled && Parameter.IsChannelCountValid())
{
- Span inputBuffers = stackalloc IntPtr[Parameter.ChannelCount];
- Span outputBuffers = stackalloc IntPtr[Parameter.ChannelCount];
+ Span inputBuffers = stackalloc nint[Parameter.ChannelCount];
+ Span outputBuffers = stackalloc nint[Parameter.ChannelCount];
for (int i = 0; i < Parameter.ChannelCount; i++)
{
diff --git a/src/Ryujinx.Audio/Renderer/Server/MemoryPool/AddressInfo.cs b/src/Ryujinx.Audio/Renderer/Server/MemoryPool/AddressInfo.cs
index a7ec4cf51..3337e44b0 100644
--- a/src/Ryujinx.Audio/Renderer/Server/MemoryPool/AddressInfo.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/MemoryPool/AddressInfo.cs
@@ -29,7 +29,7 @@ namespace Ryujinx.Audio.Renderer.Server.MemoryPool
private readonly unsafe ref MemoryPoolState MemoryPoolState => ref *_memoryPools;
- public readonly unsafe bool HasMemoryPoolState => (IntPtr)_memoryPools != IntPtr.Zero;
+ public readonly unsafe bool HasMemoryPoolState => (nint)_memoryPools != nint.Zero;
///
/// Create an new empty .
diff --git a/src/Ryujinx.Audio/Renderer/Server/MemoryPool/MemoryPoolState.cs b/src/Ryujinx.Audio/Renderer/Server/MemoryPool/MemoryPoolState.cs
index 91bd5dbf5..d0133622a 100644
--- a/src/Ryujinx.Audio/Renderer/Server/MemoryPool/MemoryPoolState.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/MemoryPool/MemoryPoolState.cs
@@ -55,7 +55,7 @@ namespace Ryujinx.Audio.Renderer.Server.MemoryPool
[MarshalAs(UnmanagedType.I1)]
public bool IsUsed;
- public static unsafe MemoryPoolState* Null => (MemoryPoolState*)IntPtr.Zero.ToPointer();
+ public static unsafe MemoryPoolState* Null => (MemoryPoolState*)nint.Zero.ToPointer();
///
/// Create a new with the given .
diff --git a/src/Ryujinx.Audio/Renderer/Server/Mix/MixState.cs b/src/Ryujinx.Audio/Renderer/Server/Mix/MixState.cs
index 5ba58ea5b..34b3ed4bd 100644
--- a/src/Ryujinx.Audio/Renderer/Server/Mix/MixState.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/Mix/MixState.cs
@@ -65,7 +65,7 @@ namespace Ryujinx.Audio.Renderer.Server.Mix
///
/// The effect processing order storage.
///
- private readonly IntPtr _effectProcessingOrderArrayPointer;
+ private readonly nint _effectProcessingOrderArrayPointer;
///
/// The max element count that can be found in the effect processing order storage.
@@ -123,7 +123,7 @@ namespace Ryujinx.Audio.Renderer.Server.Mix
{
get
{
- if (_effectProcessingOrderArrayPointer == IntPtr.Zero)
+ if (_effectProcessingOrderArrayPointer == nint.Zero)
{
return Span.Empty;
}
@@ -153,7 +153,7 @@ namespace Ryujinx.Audio.Renderer.Server.Mix
unsafe
{
// SAFETY: safe as effectProcessingOrderArray comes from the work buffer memory that is pinned.
- _effectProcessingOrderArrayPointer = (IntPtr)Unsafe.AsPointer(ref MemoryMarshal.GetReference(effectProcessingOrderArray.Span));
+ _effectProcessingOrderArrayPointer = (nint)Unsafe.AsPointer(ref MemoryMarshal.GetReference(effectProcessingOrderArray.Span));
}
EffectProcessingOrderArrayMaxCount = (uint)effectProcessingOrderArray.Length;
diff --git a/src/Ryujinx.Common/Configuration/AppDataManager.cs b/src/Ryujinx.Common/Configuration/AppDataManager.cs
index deaa03def..0b1740ba2 100644
--- a/src/Ryujinx.Common/Configuration/AppDataManager.cs
+++ b/src/Ryujinx.Common/Configuration/AppDataManager.cs
@@ -98,7 +98,7 @@ namespace Ryujinx.Common.Configuration
if (IsPathSymlink(BaseDirPath))
{
- Logger.Warning?.Print(LogClass.Application, $"Application data directory is a symlink. This may be unintended.");
+ Logger.Warning?.Print(LogClass.Application, "Application data directory is a symlink. This may be unintended.");
}
SetupBasePaths();
diff --git a/src/Ryujinx.Common/GraphicsDriver/NVThreadedOptimization.cs b/src/Ryujinx.Common/GraphicsDriver/NVThreadedOptimization.cs
index a8036ed90..c1e9e8fbb 100644
--- a/src/Ryujinx.Common/GraphicsDriver/NVThreadedOptimization.cs
+++ b/src/Ryujinx.Common/GraphicsDriver/NVThreadedOptimization.cs
@@ -21,33 +21,33 @@ namespace Ryujinx.Common.GraphicsDriver
private const uint NvAPI_DRS_DestroySession_ID = 0x0DAD9CFF8;
[LibraryImport("nvapi64")]
- private static partial IntPtr nvapi_QueryInterface(uint id);
+ private static partial nint nvapi_QueryInterface(uint id);
private delegate int NvAPI_InitializeDelegate();
private static NvAPI_InitializeDelegate NvAPI_Initialize;
- private delegate int NvAPI_DRS_CreateSessionDelegate(out IntPtr handle);
+ private delegate int NvAPI_DRS_CreateSessionDelegate(out nint handle);
private static NvAPI_DRS_CreateSessionDelegate NvAPI_DRS_CreateSession;
- private delegate int NvAPI_DRS_LoadSettingsDelegate(IntPtr handle);
+ private delegate int NvAPI_DRS_LoadSettingsDelegate(nint handle);
private static NvAPI_DRS_LoadSettingsDelegate NvAPI_DRS_LoadSettings;
- private delegate int NvAPI_DRS_FindProfileByNameDelegate(IntPtr handle, NvapiUnicodeString profileName, out IntPtr profileHandle);
+ private delegate int NvAPI_DRS_FindProfileByNameDelegate(nint handle, NvapiUnicodeString profileName, out nint profileHandle);
private static NvAPI_DRS_FindProfileByNameDelegate NvAPI_DRS_FindProfileByName;
- private delegate int NvAPI_DRS_CreateProfileDelegate(IntPtr handle, ref NvdrsProfile profileInfo, out IntPtr profileHandle);
+ private delegate int NvAPI_DRS_CreateProfileDelegate(nint handle, ref NvdrsProfile profileInfo, out nint profileHandle);
private static NvAPI_DRS_CreateProfileDelegate NvAPI_DRS_CreateProfile;
- private delegate int NvAPI_DRS_CreateApplicationDelegate(IntPtr handle, IntPtr profileHandle, ref NvdrsApplicationV4 app);
+ private delegate int NvAPI_DRS_CreateApplicationDelegate(nint handle, nint profileHandle, ref NvdrsApplicationV4 app);
private static NvAPI_DRS_CreateApplicationDelegate NvAPI_DRS_CreateApplication;
- private delegate int NvAPI_DRS_SetSettingDelegate(IntPtr handle, IntPtr profileHandle, ref NvdrsSetting setting);
+ private delegate int NvAPI_DRS_SetSettingDelegate(nint handle, nint profileHandle, ref NvdrsSetting setting);
private static NvAPI_DRS_SetSettingDelegate NvAPI_DRS_SetSetting;
- private delegate int NvAPI_DRS_SaveSettingsDelegate(IntPtr handle);
+ private delegate int NvAPI_DRS_SaveSettingsDelegate(nint handle);
private static NvAPI_DRS_SaveSettingsDelegate NvAPI_DRS_SaveSettings;
- private delegate int NvAPI_DRS_DestroySessionDelegate(IntPtr handle);
+ private delegate int NvAPI_DRS_DestroySessionDelegate(nint handle);
private static NvAPI_DRS_DestroySessionDelegate NvAPI_DRS_DestroySession;
private static bool _initialized;
@@ -94,7 +94,7 @@ namespace Ryujinx.Common.GraphicsDriver
Check(NvAPI_Initialize());
- Check(NvAPI_DRS_CreateSession(out IntPtr handle));
+ Check(NvAPI_DRS_CreateSession(out nint handle));
Check(NvAPI_DRS_LoadSettings(handle));
@@ -148,9 +148,9 @@ namespace Ryujinx.Common.GraphicsDriver
private static T NvAPI_Delegate(uint id) where T : class
{
- IntPtr ptr = nvapi_QueryInterface(id);
+ nint ptr = nvapi_QueryInterface(id);
- if (ptr != IntPtr.Zero)
+ if (ptr != nint.Zero)
{
return Marshal.GetDelegateForFunctionPointer(ptr);
}
diff --git a/src/Ryujinx.Common/Logging/Logger.cs b/src/Ryujinx.Common/Logging/Logger.cs
index b689ccbde..8dcf1a7cf 100644
--- a/src/Ryujinx.Common/Logging/Logger.cs
+++ b/src/Ryujinx.Common/Logging/Logger.cs
@@ -212,9 +212,7 @@ namespace Ryujinx.Common.Logging
foreach (var log in logs)
{
if (log.HasValue)
- {
levels.Add(log.Value.Level);
- }
}
return levels;
@@ -233,6 +231,7 @@ namespace Ryujinx.Common.Logging
case LogLevel.AccessLog : AccessLog = enabled ? new Log(LogLevel.AccessLog) : new Log?(); break;
case LogLevel.Stub : Stub = enabled ? new Log(LogLevel.Stub) : new Log?(); break;
case LogLevel.Trace : Trace = enabled ? new Log(LogLevel.Trace) : new Log?(); break;
+ case LogLevel.Notice : break;
default: throw new ArgumentException("Unknown Log Level", nameof(logLevel));
#pragma warning restore IDE0055
}
diff --git a/src/Ryujinx.Common/Memory/ArrayPtr.cs b/src/Ryujinx.Common/Memory/ArrayPtr.cs
index 7487a1ff5..a54bdb3f6 100644
--- a/src/Ryujinx.Common/Memory/ArrayPtr.cs
+++ b/src/Ryujinx.Common/Memory/ArrayPtr.cs
@@ -11,17 +11,17 @@ namespace Ryujinx.Common.Memory
/// Array element type
public unsafe struct ArrayPtr : IEquatable>, IArray where T : unmanaged
{
- private IntPtr _ptr;
+ private nint _ptr;
///
/// Null pointer.
///
- public static ArrayPtr Null => new() { _ptr = IntPtr.Zero };
+ public static ArrayPtr Null => new() { _ptr = nint.Zero };
///
/// True if the pointer is null, false otherwise.
///
- public readonly bool IsNull => _ptr == IntPtr.Zero;
+ public readonly bool IsNull => _ptr == nint.Zero;
///
/// Number of elements on the array.
@@ -50,7 +50,7 @@ namespace Ryujinx.Common.Memory
/// Number of elements on the array
public ArrayPtr(ref T value, int length)
{
- _ptr = (IntPtr)Unsafe.AsPointer(ref value);
+ _ptr = (nint)Unsafe.AsPointer(ref value);
Length = length;
}
@@ -61,7 +61,7 @@ namespace Ryujinx.Common.Memory
/// Number of elements on the array
public ArrayPtr(T* ptr, int length)
{
- _ptr = (IntPtr)ptr;
+ _ptr = (nint)ptr;
Length = length;
}
@@ -70,7 +70,7 @@ namespace Ryujinx.Common.Memory
///
/// Array base pointer
/// Number of elements on the array
- public ArrayPtr(IntPtr ptr, int length)
+ public ArrayPtr(nint ptr, int length)
{
_ptr = ptr;
Length = length;
diff --git a/src/Ryujinx.Common/Memory/PartialUnmaps/PartialUnmapState.cs b/src/Ryujinx.Common/Memory/PartialUnmaps/PartialUnmapState.cs
index 93fef5c3b..60fdd7af6 100644
--- a/src/Ryujinx.Common/Memory/PartialUnmaps/PartialUnmapState.cs
+++ b/src/Ryujinx.Common/Memory/PartialUnmaps/PartialUnmapState.cs
@@ -21,7 +21,7 @@ namespace Ryujinx.Common.Memory.PartialUnmaps
public readonly static int PartialUnmapsCountOffset;
public readonly static int LocalCountsOffset;
- public readonly static IntPtr GlobalState;
+ public readonly static nint GlobalState;
[SupportedOSPlatform("windows")]
[LibraryImport("kernel32.dll")]
@@ -29,17 +29,17 @@ namespace Ryujinx.Common.Memory.PartialUnmaps
[SupportedOSPlatform("windows")]
[LibraryImport("kernel32.dll", SetLastError = true)]
- private static partial IntPtr OpenThread(int dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, uint dwThreadId);
+ private static partial nint OpenThread(int dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, uint dwThreadId);
[SupportedOSPlatform("windows")]
[LibraryImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- private static partial bool CloseHandle(IntPtr hObject);
+ private static partial bool CloseHandle(nint hObject);
[SupportedOSPlatform("windows")]
[LibraryImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- private static partial bool GetExitCodeThread(IntPtr hThread, out uint lpExitCode);
+ private static partial bool GetExitCodeThread(nint hThread, out uint lpExitCode);
///
/// Creates a global static PartialUnmapState and populates the field offsets.
@@ -137,9 +137,9 @@ namespace Ryujinx.Common.Memory.PartialUnmaps
if (id != 0)
{
- IntPtr handle = OpenThread(ThreadQueryInformation, false, (uint)id);
+ nint handle = OpenThread(ThreadQueryInformation, false, (uint)id);
- if (handle == IntPtr.Zero)
+ if (handle == nint.Zero)
{
Interlocked.CompareExchange(ref ids[i], 0, id);
}
diff --git a/src/Ryujinx.Common/Memory/Ptr.cs b/src/Ryujinx.Common/Memory/Ptr.cs
index d01748c16..3a8c1e1b6 100644
--- a/src/Ryujinx.Common/Memory/Ptr.cs
+++ b/src/Ryujinx.Common/Memory/Ptr.cs
@@ -10,17 +10,17 @@ namespace Ryujinx.Common.Memory
/// Type of the unmanaged resource
public unsafe struct Ptr : IEquatable> where T : unmanaged
{
- private IntPtr _ptr;
+ private nint _ptr;
///
/// Null pointer.
///
- public static Ptr Null => new() { _ptr = IntPtr.Zero };
+ public static Ptr Null => new() { _ptr = nint.Zero };
///
/// True if the pointer is null, false otherwise.
///
- public readonly bool IsNull => _ptr == IntPtr.Zero;
+ public readonly bool IsNull => _ptr == nint.Zero;
///
/// Gets a reference to the value.
@@ -37,7 +37,7 @@ namespace Ryujinx.Common.Memory
/// Reference to the unmanaged resource
public Ptr(ref T value)
{
- _ptr = (IntPtr)Unsafe.AsPointer(ref value);
+ _ptr = (nint)Unsafe.AsPointer(ref value);
}
public readonly override bool Equals(object obj)
diff --git a/src/Ryujinx.Common/ReactiveObject.cs b/src/Ryujinx.Common/ReactiveObject.cs
index b25f778fb..4f27af546 100644
--- a/src/Ryujinx.Common/ReactiveObject.cs
+++ b/src/Ryujinx.Common/ReactiveObject.cs
@@ -41,10 +41,12 @@ namespace Ryujinx.Common
}
}
- public static implicit operator T(ReactiveObject obj)
- {
- return obj.Value;
- }
+ public static implicit operator T(ReactiveObject obj) => obj.Value;
+ }
+
+ public static class ReactiveObjectHelper
+ {
+ public static void Toggle(this ReactiveObject rBoolean) => rBoolean.Value = !rBoolean.Value;
}
public class ReactiveEventArgs(T oldValue, T newValue)
diff --git a/src/Ryujinx.Common/SystemInterop/ForceDpiAware.cs b/src/Ryujinx.Common/SystemInterop/ForceDpiAware.cs
index b8e1df7d2..330638171 100644
--- a/src/Ryujinx.Common/SystemInterop/ForceDpiAware.cs
+++ b/src/Ryujinx.Common/SystemInterop/ForceDpiAware.cs
@@ -14,19 +14,19 @@ namespace Ryujinx.Common.SystemInterop
private const string X11LibraryName = "libX11.so.6";
[LibraryImport(X11LibraryName)]
- private static partial IntPtr XOpenDisplay([MarshalAs(UnmanagedType.LPStr)] string display);
+ private static partial nint XOpenDisplay([MarshalAs(UnmanagedType.LPStr)] string display);
[LibraryImport(X11LibraryName)]
- private static partial IntPtr XGetDefault(IntPtr display, [MarshalAs(UnmanagedType.LPStr)] string program, [MarshalAs(UnmanagedType.LPStr)] string option);
+ private static partial nint XGetDefault(nint display, [MarshalAs(UnmanagedType.LPStr)] string program, [MarshalAs(UnmanagedType.LPStr)] string option);
[LibraryImport(X11LibraryName)]
- private static partial int XDisplayWidth(IntPtr display, int screenNumber);
+ private static partial int XDisplayWidth(nint display, int screenNumber);
[LibraryImport(X11LibraryName)]
- private static partial int XDisplayWidthMM(IntPtr display, int screenNumber);
+ private static partial int XDisplayWidthMM(nint display, int screenNumber);
[LibraryImport(X11LibraryName)]
- private static partial int XCloseDisplay(IntPtr display);
+ private static partial int XCloseDisplay(nint display);
private const double StandardDpiScale = 96.0;
private const double MaxScaleFactor = 1.25;
@@ -51,7 +51,7 @@ namespace Ryujinx.Common.SystemInterop
{
if (OperatingSystem.IsWindows())
{
- userDpiScale = GdiPlusHelper.GetDpiX(IntPtr.Zero);
+ userDpiScale = GdiPlusHelper.GetDpiX(nint.Zero);
}
else if (OperatingSystem.IsLinux())
{
@@ -59,7 +59,7 @@ namespace Ryujinx.Common.SystemInterop
if (xdgSessionType == null || xdgSessionType == "x11")
{
- IntPtr display = XOpenDisplay(null);
+ nint display = XOpenDisplay(null);
string dpiString = Marshal.PtrToStringAnsi(XGetDefault(display, "Xft", "dpi"));
if (dpiString == null || !double.TryParse(dpiString, NumberStyles.Any, CultureInfo.InvariantCulture, out userDpiScale))
{
diff --git a/src/Ryujinx.Common/SystemInterop/GdiPlusHelper.cs b/src/Ryujinx.Common/SystemInterop/GdiPlusHelper.cs
index 7e8e9f2a5..c00598c98 100644
--- a/src/Ryujinx.Common/SystemInterop/GdiPlusHelper.cs
+++ b/src/Ryujinx.Common/SystemInterop/GdiPlusHelper.cs
@@ -9,7 +9,7 @@ namespace Ryujinx.Common.SystemInterop
{
private const string LibraryName = "gdiplus.dll";
- private static readonly IntPtr _initToken;
+ private static readonly nint _initToken;
static GdiPlusHelper()
{
@@ -29,7 +29,7 @@ namespace Ryujinx.Common.SystemInterop
public int GdiplusVersion;
#pragma warning disable CS0649 // Field is never assigned to
- public IntPtr DebugEventCallback;
+ public nint DebugEventCallback;
public int SuppressBackgroundThread;
public int SuppressExternalCodecs;
public int StartupParameters;
@@ -39,7 +39,7 @@ namespace Ryujinx.Common.SystemInterop
{
// We assume Windows 8 and upper
GdiplusVersion = 2,
- DebugEventCallback = IntPtr.Zero,
+ DebugEventCallback = nint.Zero,
SuppressBackgroundThread = 0,
SuppressExternalCodecs = 0,
StartupParameters = 0,
@@ -48,25 +48,25 @@ namespace Ryujinx.Common.SystemInterop
private struct StartupOutput
{
- public IntPtr NotificationHook;
- public IntPtr NotificationUnhook;
+ public nint NotificationHook;
+ public nint NotificationUnhook;
}
[LibraryImport(LibraryName)]
- private static partial int GdiplusStartup(out IntPtr token, in StartupInputEx input, out StartupOutput output);
+ private static partial int GdiplusStartup(out nint token, in StartupInputEx input, out StartupOutput output);
[LibraryImport(LibraryName)]
- private static partial int GdipCreateFromHWND(IntPtr hwnd, out IntPtr graphics);
+ private static partial int GdipCreateFromHWND(nint hwnd, out nint graphics);
[LibraryImport(LibraryName)]
- private static partial int GdipDeleteGraphics(IntPtr graphics);
+ private static partial int GdipDeleteGraphics(nint graphics);
[LibraryImport(LibraryName)]
- private static partial int GdipGetDpiX(IntPtr graphics, out float dpi);
+ private static partial int GdipGetDpiX(nint graphics, out float dpi);
- public static float GetDpiX(IntPtr hwnd)
+ public static float GetDpiX(nint hwnd)
{
- CheckStatus(GdipCreateFromHWND(hwnd, out IntPtr graphicsHandle));
+ CheckStatus(GdipCreateFromHWND(hwnd, out nint graphicsHandle));
CheckStatus(GdipGetDpiX(graphicsHandle, out float result));
CheckStatus(GdipDeleteGraphics(graphicsHandle));
diff --git a/src/Ryujinx.Cpu/AppleHv/HvApi.cs b/src/Ryujinx.Cpu/AppleHv/HvApi.cs
index e6e08111f..864f6b063 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvApi.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvApi.cs
@@ -273,7 +273,7 @@ namespace Ryujinx.Cpu.AppleHv
public static partial HvResult hv_vm_get_max_vcpu_count(out uint max_vcpu_count);
[LibraryImport(LibraryName, SetLastError = true)]
- public static partial HvResult hv_vm_create(IntPtr config);
+ public static partial HvResult hv_vm_create(nint config);
[LibraryImport(LibraryName, SetLastError = true)]
public static partial HvResult hv_vm_destroy();
@@ -288,7 +288,7 @@ namespace Ryujinx.Cpu.AppleHv
public static partial HvResult hv_vm_protect(ulong ipa, ulong size, HvMemoryFlags flags);
[LibraryImport(LibraryName, SetLastError = true)]
- public unsafe static partial HvResult hv_vcpu_create(out ulong vcpu, ref HvVcpuExit* exit, IntPtr config);
+ public unsafe static partial HvResult hv_vcpu_create(out ulong vcpu, ref HvVcpuExit* exit, nint config);
[LibraryImport(LibraryName, SetLastError = true)]
public unsafe static partial HvResult hv_vcpu_destroy(ulong vcpu);
diff --git a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
index bb232940d..9d459d062 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
@@ -10,9 +10,9 @@ namespace Ryujinx.Cpu.AppleHv
class HvExecutionContextVcpu : IHvExecutionContext
{
private static readonly MemoryBlock _setSimdFpRegFuncMem;
- private delegate HvResult SetSimdFpReg(ulong vcpu, HvSimdFPReg reg, in V128 value, IntPtr funcPtr);
+ private delegate HvResult SetSimdFpReg(ulong vcpu, HvSimdFPReg reg, in V128 value, nint funcPtr);
private static readonly SetSimdFpReg _setSimdFpReg;
- private static readonly IntPtr _setSimdFpRegNativePtr;
+ private static readonly nint _setSimdFpRegNativePtr;
static HvExecutionContextVcpu()
{
@@ -25,7 +25,7 @@ namespace Ryujinx.Cpu.AppleHv
_setSimdFpReg = Marshal.GetDelegateForFunctionPointer(_setSimdFpRegFuncMem.Pointer);
- if (NativeLibrary.TryLoad(HvApi.LibraryName, out IntPtr hvLibHandle))
+ if (NativeLibrary.TryLoad(HvApi.LibraryName, out nint hvLibHandle))
{
_setSimdFpRegNativePtr = NativeLibrary.GetExport(hvLibHandle, nameof(HvApi.hv_vcpu_set_simd_fp_reg));
}
diff --git a/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs b/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
index abdddb31c..bb56a4344 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
@@ -32,7 +32,7 @@ namespace Ryujinx.Cpu.AppleHv
public int AddressSpaceBits { get; }
- public IntPtr PageTablePointer => IntPtr.Zero;
+ public nint PageTablePointer => nint.Zero;
public MemoryManagerType Type => MemoryManagerType.SoftwarePageTable;
@@ -244,7 +244,7 @@ namespace Ryujinx.Cpu.AppleHv
for (int i = 0; i < regions.Length; i++)
{
var guestRegion = guestRegions[i];
- IntPtr pointer = _backingMemory.GetPointer(guestRegion.Address, guestRegion.Size);
+ nint pointer = _backingMemory.GetPointer(guestRegion.Address, guestRegion.Size);
regions[i] = new HostMemoryRange((nuint)(ulong)pointer, guestRegion.Size);
}
diff --git a/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs b/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
index 2edcd7e4e..af124fc7a 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
@@ -72,7 +72,7 @@ namespace Ryujinx.Cpu.AppleHv
// Create VCPU.
HvVcpuExit* exitInfo = null;
- HvApi.hv_vcpu_create(out ulong vcpuHandle, ref exitInfo, IntPtr.Zero).ThrowOnError();
+ HvApi.hv_vcpu_create(out ulong vcpuHandle, ref exitInfo, nint.Zero).ThrowOnError();
// Enable FP and SIMD instructions.
HvApi.hv_vcpu_set_sys_reg(vcpuHandle, HvSysReg.CPACR_EL1, 0b11 << 20).ThrowOnError();
diff --git a/src/Ryujinx.Cpu/AppleHv/HvVm.cs b/src/Ryujinx.Cpu/AppleHv/HvVm.cs
index c4f107532..a12bbea9b 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvVm.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvVm.cs
@@ -22,7 +22,7 @@ namespace Ryujinx.Cpu.AppleHv
{
if (++_addressSpaces == 1)
{
- HvApi.hv_vm_create(IntPtr.Zero).ThrowOnError();
+ HvApi.hv_vm_create(nint.Zero).ThrowOnError();
_ipaAllocator = ipaAllocator = new HvIpaAllocator();
}
else
diff --git a/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartition.cs b/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartition.cs
index 224c5edc3..f9743a0a1 100644
--- a/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartition.cs
+++ b/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartition.cs
@@ -307,7 +307,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
ulong size,
MemoryPermission protection,
AddressSpacePartitioned addressSpace,
- Action updatePtCallback)
+ Action updatePtCallback)
{
if (_baseMemory.LazyInitMirrorForProtection(addressSpace, Address, Size, protection))
{
@@ -317,7 +317,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
updatePtCallback(va, _baseMemory.GetPointerForProtection(va - Address, size, protection), size);
}
- public IntPtr GetPointer(ulong va, ulong size)
+ public nint GetPointer(ulong va, ulong size)
{
Debug.Assert(va >= Address);
Debug.Assert(va + size <= EndAddress);
diff --git a/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitionAllocator.cs b/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitionAllocator.cs
index 44dedb640..a49e0179d 100644
--- a/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitionAllocator.cs
+++ b/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitionAllocator.cs
@@ -11,7 +11,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
private readonly AddressSpacePartitionAllocator _owner;
private readonly PrivateMemoryAllocatorImpl.Allocation _allocation;
- public IntPtr Pointer => (IntPtr)((ulong)_allocation.Block.Memory.Pointer + _allocation.Offset);
+ public nint Pointer => (nint)((ulong)_allocation.Block.Memory.Pointer + _allocation.Offset);
public bool IsValid => _owner != null;
@@ -43,7 +43,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
_allocation.Block.Memory.Reprotect(_allocation.Offset + offset, size, permission, throwOnFail);
}
- public IntPtr GetPointer(ulong offset, ulong size)
+ public nint GetPointer(ulong offset, ulong size)
{
return _allocation.Block.Memory.GetPointer(_allocation.Offset + offset, size);
}
diff --git a/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitionMultiAllocation.cs b/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitionMultiAllocation.cs
index 3b065583f..db1f3ea4b 100644
--- a/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitionMultiAllocation.cs
+++ b/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitionMultiAllocation.cs
@@ -47,7 +47,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
_baseMemory.Reprotect(offset, size, permission, throwOnFail);
}
- public IntPtr GetPointer(ulong offset, ulong size)
+ public nint GetPointer(ulong offset, ulong size)
{
return _baseMemory.GetPointer(offset, size);
}
@@ -68,7 +68,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
return false;
}
- public IntPtr GetPointerForProtection(ulong offset, ulong size, MemoryPermission permission)
+ public nint GetPointerForProtection(ulong offset, ulong size, MemoryPermission permission)
{
AddressSpacePartitionAllocation allocation = permission switch
{
diff --git a/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitioned.cs b/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitioned.cs
index 2cf2c248b..e3cb75f64 100644
--- a/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitioned.cs
+++ b/src/Ryujinx.Cpu/Jit/HostTracked/AddressSpacePartitioned.cs
@@ -15,7 +15,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
private readonly MemoryBlock _backingMemory;
private readonly List _partitions;
private readonly AddressSpacePartitionAllocator _asAllocator;
- private readonly Action _updatePtCallback;
+ private readonly Action _updatePtCallback;
private readonly bool _useProtectionMirrors;
public AddressSpacePartitioned(MemoryTracking tracking, MemoryBlock backingMemory, NativePageTable nativePageTable, bool useProtectionMirrors)
@@ -212,7 +212,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
}
}
- public IntPtr GetPointer(ulong va, ulong size)
+ public nint GetPointer(ulong va, ulong size)
{
AddressSpacePartition partition = FindPartition(va);
diff --git a/src/Ryujinx.Cpu/Jit/HostTracked/NativePageTable.cs b/src/Ryujinx.Cpu/Jit/HostTracked/NativePageTable.cs
index e3174e3fc..aa663d7d9 100644
--- a/src/Ryujinx.Cpu/Jit/HostTracked/NativePageTable.cs
+++ b/src/Ryujinx.Cpu/Jit/HostTracked/NativePageTable.cs
@@ -30,7 +30,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
private bool _disposed;
- public IntPtr PageTablePointer => _nativePageTable.Pointer;
+ public nint PageTablePointer => _nativePageTable.Pointer;
public NativePageTable(ulong asSize)
{
@@ -83,7 +83,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
public void Unmap(ulong va, ulong size)
{
- IntPtr guardPagePtr = GetGuardPagePointer();
+ nint guardPagePtr = GetGuardPagePointer();
while (size != 0)
{
@@ -104,7 +104,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
return pte + (va & PageMask);
}
- public void Update(ulong va, IntPtr ptr, ulong size)
+ public void Update(ulong va, nint ptr, ulong size)
{
ulong remainingSize = size;
@@ -148,7 +148,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
Debug.Assert(pageSpan.Length == _entriesPerPtPage);
- IntPtr guardPagePtr = GetGuardPagePointer();
+ nint guardPagePtr = GetGuardPagePointer();
for (int i = 0; i < pageSpan.Length; i++)
{
@@ -160,12 +160,12 @@ namespace Ryujinx.Cpu.Jit.HostTracked
}
}
- private IntPtr GetGuardPagePointer()
+ private nint GetGuardPagePointer()
{
return _nativePageTable.GetPointer(_nativePageTable.Size - _hostPageSize, _hostPageSize);
}
- private static ulong GetPte(ulong va, IntPtr ptr)
+ private static ulong GetPte(ulong va, nint ptr)
{
Debug.Assert((va & PageMask) == 0);
diff --git a/src/Ryujinx.Cpu/Jit/JitMemoryBlock.cs b/src/Ryujinx.Cpu/Jit/JitMemoryBlock.cs
index bd07d349c..0311db565 100644
--- a/src/Ryujinx.Cpu/Jit/JitMemoryBlock.cs
+++ b/src/Ryujinx.Cpu/Jit/JitMemoryBlock.cs
@@ -8,7 +8,7 @@ namespace Ryujinx.Cpu.Jit
{
private readonly MemoryBlock _impl;
- public IntPtr Pointer => _impl.Pointer;
+ public nint Pointer => _impl.Pointer;
public JitMemoryBlock(ulong size, MemoryAllocationFlags flags)
{
diff --git a/src/Ryujinx.Cpu/Jit/MemoryManager.cs b/src/Ryujinx.Cpu/Jit/MemoryManager.cs
index 6f594ec2f..049e508d0 100644
--- a/src/Ryujinx.Cpu/Jit/MemoryManager.cs
+++ b/src/Ryujinx.Cpu/Jit/MemoryManager.cs
@@ -39,7 +39,7 @@ namespace Ryujinx.Cpu.Jit
///
/// Page table base pointer.
///
- public IntPtr PageTablePointer => _pageTable.Pointer;
+ public nint PageTablePointer => _pageTable.Pointer;
public MemoryManagerType Type => MemoryManagerType.SoftwarePageTable;
@@ -264,7 +264,7 @@ namespace Ryujinx.Cpu.Jit
for (int i = 0; i < regions.Length; i++)
{
var guestRegion = guestRegions[i];
- IntPtr pointer = _backingMemory.GetPointer(guestRegion.Address, guestRegion.Size);
+ nint pointer = _backingMemory.GetPointer(guestRegion.Address, guestRegion.Size);
regions[i] = new HostMemoryRange((nuint)(ulong)pointer, guestRegion.Size);
}
diff --git a/src/Ryujinx.Cpu/Jit/MemoryManagerHostMapped.cs b/src/Ryujinx.Cpu/Jit/MemoryManagerHostMapped.cs
index 4639ab913..0fe8b344f 100644
--- a/src/Ryujinx.Cpu/Jit/MemoryManagerHostMapped.cs
+++ b/src/Ryujinx.Cpu/Jit/MemoryManagerHostMapped.cs
@@ -31,7 +31,7 @@ namespace Ryujinx.Cpu.Jit
public int AddressSpaceBits { get; }
- public IntPtr PageTablePointer => _addressSpace.Base.Pointer;
+ public nint PageTablePointer => _addressSpace.Base.Pointer;
public MemoryManagerType Type => _unsafeMode ? MemoryManagerType.HostMappedUnsafe : MemoryManagerType.HostMapped;
diff --git a/src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs b/src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs
index 501109b86..4dab212a7 100644
--- a/src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs
+++ b/src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs
@@ -37,7 +37,7 @@ namespace Ryujinx.Cpu.Jit
///
public bool UsesPrivateAllocations => true;
- public IntPtr PageTablePointer => _nativePageTable.PageTablePointer;
+ public nint PageTablePointer => _nativePageTable.PageTablePointer;
public MemoryManagerType Type => _unsafeMode ? MemoryManagerType.HostTrackedUnsafe : MemoryManagerType.HostTracked;
@@ -452,7 +452,7 @@ namespace Ryujinx.Cpu.Jit
{
(MemoryBlock memory, ulong rangeOffset, ulong rangeSize) = GetMemoryOffsetAndSize(va, endVa - va);
- regions.Add(new((UIntPtr)memory.GetPointer(rangeOffset, rangeSize), rangeSize));
+ regions.Add(new((nuint)memory.GetPointer(rangeOffset, rangeSize), rangeSize));
va += rangeSize;
}
@@ -469,7 +469,7 @@ namespace Ryujinx.Cpu.Jit
{
if (size == 0)
{
- return Enumerable.Empty();
+ return [];
}
return GetPhysicalRegionsImpl(va, size);
diff --git a/src/Ryujinx.Cpu/LightningJit/AarchCompiler.cs b/src/Ryujinx.Cpu/LightningJit/AarchCompiler.cs
index ee4fc439f..89e1499c0 100644
--- a/src/Ryujinx.Cpu/LightningJit/AarchCompiler.cs
+++ b/src/Ryujinx.Cpu/LightningJit/AarchCompiler.cs
@@ -15,7 +15,7 @@ namespace Ryujinx.Cpu.LightningJit
IMemoryManager memoryManager,
ulong address,
AddressTable funcTable,
- IntPtr dispatchStubPtr,
+ nint dispatchStubPtr,
ExecutionMode executionMode,
Architecture targetArch)
{
diff --git a/src/Ryujinx.Cpu/LightningJit/Arm32/A32Compiler.cs b/src/Ryujinx.Cpu/LightningJit/Arm32/A32Compiler.cs
index 7f6024d47..0fe42b923 100644
--- a/src/Ryujinx.Cpu/LightningJit/Arm32/A32Compiler.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Arm32/A32Compiler.cs
@@ -13,7 +13,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm32
IMemoryManager memoryManager,
ulong address,
AddressTable funcTable,
- IntPtr dispatchStubPtr,
+ nint dispatchStubPtr,
bool isThumb,
Architecture targetArch)
{
diff --git a/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/Compiler.cs b/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/Compiler.cs
index a668b5777..0d56f28c9 100644
--- a/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/Compiler.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/Compiler.cs
@@ -24,10 +24,10 @@ namespace Ryujinx.Cpu.LightningJit.Arm32.Target.Arm64
public readonly MemoryManagerType MemoryManagerType;
public readonly TailMerger TailMerger;
public readonly AddressTable FuncTable;
- public readonly IntPtr DispatchStubPointer;
+ public readonly nint DispatchStubPointer;
private readonly RegisterSaveRestore _registerSaveRestore;
- private readonly IntPtr _pageTablePointer;
+ private readonly nint _pageTablePointer;
public Context(
CodeWriter writer,
@@ -36,8 +36,8 @@ namespace Ryujinx.Cpu.LightningJit.Arm32.Target.Arm64
TailMerger tailMerger,
AddressTable funcTable,
RegisterSaveRestore registerSaveRestore,
- IntPtr dispatchStubPointer,
- IntPtr pageTablePointer)
+ nint dispatchStubPointer,
+ nint pageTablePointer)
{
Writer = writer;
RegisterAllocator = registerAllocator;
@@ -226,7 +226,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm32.Target.Arm64
}
}
- public static CompiledFunction Compile(CpuPreset cpuPreset, IMemoryManager memoryManager, ulong address, AddressTable funcTable, IntPtr dispatchStubPtr, bool isThumb)
+ public static CompiledFunction Compile(CpuPreset cpuPreset, IMemoryManager memoryManager, ulong address, AddressTable funcTable, nint dispatchStubPtr, bool isThumb)
{
MultiBlock multiBlock = Decoder.DecodeMulti(cpuPreset, memoryManager, address, isThumb);
diff --git a/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitFlow.cs b/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitFlow.cs
index 3b1ff5a2a..7f5e4835c 100644
--- a/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitFlow.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitFlow.cs
@@ -133,7 +133,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm32.Target.Arm64
TailMerger tailMerger,
Action writeEpilogue,
AddressTable funcTable,
- IntPtr funcPtr,
+ nint funcPtr,
int spillBaseOffset,
uint nextAddress,
Operand guestAddress,
diff --git a/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitSystem.cs b/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitSystem.cs
index 07f9f86a8..4d97a2264 100644
--- a/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitSystem.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitSystem.cs
@@ -324,27 +324,27 @@ namespace Ryujinx.Cpu.LightningJit.Arm32.Target.Arm64
Udf(context, encoding, 0);
}
- private static IntPtr GetBkptHandlerPtr()
+ private static nint GetBkptHandlerPtr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.Break);
}
- private static IntPtr GetSvcHandlerPtr()
+ private static nint GetSvcHandlerPtr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.SupervisorCall);
}
- private static IntPtr GetUdfHandlerPtr()
+ private static nint GetUdfHandlerPtr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.Undefined);
}
- private static IntPtr GetCntpctEl0Ptr()
+ private static nint GetCntpctEl0Ptr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.GetCntpctEl0);
}
- private static IntPtr CheckSynchronizationPtr()
+ private static nint CheckSynchronizationPtr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.CheckSynchronization);
}
@@ -474,7 +474,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm32.Target.Arm64
private static void WriteCall(
ref Assembler asm,
RegisterAllocator regAlloc,
- IntPtr funcPtr,
+ nint funcPtr,
bool skipContext,
int spillBaseOffset,
int? resultRegister,
diff --git a/src/Ryujinx.Cpu/LightningJit/Arm64/A64Compiler.cs b/src/Ryujinx.Cpu/LightningJit/Arm64/A64Compiler.cs
index b46ae3b0c..44de4cd0d 100644
--- a/src/Ryujinx.Cpu/LightningJit/Arm64/A64Compiler.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Arm64/A64Compiler.cs
@@ -13,7 +13,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64
IMemoryManager memoryManager,
ulong address,
AddressTable funcTable,
- IntPtr dispatchStubPtr,
+ nint dispatchStubPtr,
Architecture targetArch)
{
if (targetArch == Architecture.Arm64)
diff --git a/src/Ryujinx.Cpu/LightningJit/Arm64/Target/Arm64/Compiler.cs b/src/Ryujinx.Cpu/LightningJit/Arm64/Target/Arm64/Compiler.cs
index 7a6d761e8..4a3c507df 100644
--- a/src/Ryujinx.Cpu/LightningJit/Arm64/Target/Arm64/Compiler.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Arm64/Target/Arm64/Compiler.cs
@@ -20,11 +20,11 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
public readonly RegisterAllocator RegisterAllocator;
public readonly TailMerger TailMerger;
public readonly AddressTable FuncTable;
- public readonly IntPtr DispatchStubPointer;
+ public readonly nint DispatchStubPointer;
private readonly MultiBlock _multiBlock;
private readonly RegisterSaveRestore _registerSaveRestore;
- private readonly IntPtr _pageTablePointer;
+ private readonly nint _pageTablePointer;
public Context(
CodeWriter writer,
@@ -33,8 +33,8 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
RegisterSaveRestore registerSaveRestore,
MultiBlock multiBlock,
AddressTable funcTable,
- IntPtr dispatchStubPointer,
- IntPtr pageTablePointer)
+ nint dispatchStubPointer,
+ nint pageTablePointer)
{
Writer = writer;
RegisterAllocator = registerAllocator;
@@ -304,7 +304,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
}
}
- public static CompiledFunction Compile(CpuPreset cpuPreset, IMemoryManager memoryManager, ulong address, AddressTable funcTable, IntPtr dispatchStubPtr)
+ public static CompiledFunction Compile(CpuPreset cpuPreset, IMemoryManager memoryManager, ulong address, AddressTable funcTable, nint dispatchStubPtr)
{
MultiBlock multiBlock = Decoder.DecodeMulti(cpuPreset, memoryManager, address);
diff --git a/src/Ryujinx.Cpu/LightningJit/Arm64/Target/Arm64/InstEmitSystem.cs b/src/Ryujinx.Cpu/LightningJit/Arm64/Target/Arm64/InstEmitSystem.cs
index 82cb29d73..1eeeb746e 100644
--- a/src/Ryujinx.Cpu/LightningJit/Arm64/Target/Arm64/InstEmitSystem.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Arm64/Target/Arm64/InstEmitSystem.cs
@@ -144,27 +144,27 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
return name == InstName.Svc;
}
- private static IntPtr GetBrkHandlerPtr()
+ private static nint GetBrkHandlerPtr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.Break);
}
- private static IntPtr GetSvcHandlerPtr()
+ private static nint GetSvcHandlerPtr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.SupervisorCall);
}
- private static IntPtr GetUdfHandlerPtr()
+ private static nint GetUdfHandlerPtr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.Undefined);
}
- private static IntPtr GetCntpctEl0Ptr()
+ private static nint GetCntpctEl0Ptr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.GetCntpctEl0);
}
- private static IntPtr CheckSynchronizationPtr()
+ private static nint CheckSynchronizationPtr()
{
return Marshal.GetFunctionPointerForDelegate(NativeInterface.CheckSynchronization);
}
@@ -215,7 +215,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
TailMerger tailMerger,
Action writeEpilogue,
AddressTable funcTable,
- IntPtr dispatchStubPtr,
+ nint dispatchStubPtr,
InstName name,
ulong pc,
uint encoding,
@@ -298,7 +298,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
TailMerger tailMerger,
Action writeEpilogue,
AddressTable funcTable,
- IntPtr funcPtr,
+ nint funcPtr,
int spillBaseOffset,
ulong pc,
Operand guestAddress,
@@ -369,7 +369,7 @@ namespace Ryujinx.Cpu.LightningJit.Arm64.Target.Arm64
private static void WriteCall(
ref Assembler asm,
RegisterAllocator regAlloc,
- IntPtr funcPtr,
+ nint funcPtr,
int spillBaseOffset,
int? resultRegister,
params ulong[] callArgs)
diff --git a/src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs b/src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs
index 6f1191ca5..ac1274bf6 100644
--- a/src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Cache/JitCache.cs
@@ -28,7 +28,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
[SupportedOSPlatform("windows")]
[LibraryImport("kernel32.dll", SetLastError = true)]
- public static partial IntPtr FlushInstructionCache(IntPtr hProcess, IntPtr lpAddress, UIntPtr dwSize);
+ public static partial nint FlushInstructionCache(nint hProcess, nint lpAddress, nuint dwSize);
public static void Initialize(IJitMemoryAllocator allocator)
{
@@ -57,7 +57,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
}
}
- public unsafe static IntPtr Map(ReadOnlySpan code)
+ public unsafe static nint Map(ReadOnlySpan code)
{
lock (_lock)
{
@@ -65,7 +65,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
int funcOffset = Allocate(code.Length);
- IntPtr funcPtr = _jitRegion.Pointer + funcOffset;
+ nint funcPtr = _jitRegion.Pointer + funcOffset;
if (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
{
@@ -73,7 +73,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
{
fixed (byte* codePtr = code)
{
- JitSupportDarwin.Copy(funcPtr, (IntPtr)codePtr, (ulong)code.Length);
+ JitSupportDarwin.Copy(funcPtr, (nint)codePtr, (ulong)code.Length);
}
}
}
@@ -85,7 +85,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
if (OperatingSystem.IsWindows() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
{
- FlushInstructionCache(Process.GetCurrentProcess().Handle, funcPtr, (UIntPtr)code.Length);
+ FlushInstructionCache(Process.GetCurrentProcess().Handle, funcPtr, (nuint)code.Length);
}
else
{
@@ -99,7 +99,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
}
}
- public static void Unmap(IntPtr pointer)
+ public static void Unmap(nint pointer)
{
lock (_lock)
{
diff --git a/src/Ryujinx.Cpu/LightningJit/Cache/JitCacheInvalidation.cs b/src/Ryujinx.Cpu/LightningJit/Cache/JitCacheInvalidation.cs
index cd5f3ede4..d0a5e4ac8 100644
--- a/src/Ryujinx.Cpu/LightningJit/Cache/JitCacheInvalidation.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Cache/JitCacheInvalidation.cs
@@ -68,7 +68,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
}
}
- public void Invalidate(IntPtr basePointer, ulong size)
+ public void Invalidate(nint basePointer, ulong size)
{
if (_needsInvalidation)
{
diff --git a/src/Ryujinx.Cpu/LightningJit/Cache/JitSupportDarwin.cs b/src/Ryujinx.Cpu/LightningJit/Cache/JitSupportDarwin.cs
index 06c81045d..ed02a9c28 100644
--- a/src/Ryujinx.Cpu/LightningJit/Cache/JitSupportDarwin.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Cache/JitSupportDarwin.cs
@@ -8,9 +8,9 @@ namespace Ryujinx.Cpu.LightningJit.Cache
static partial class JitSupportDarwin
{
[LibraryImport("libarmeilleure-jitsupport", EntryPoint = "armeilleure_jit_memcpy")]
- public static partial void Copy(IntPtr dst, IntPtr src, ulong n);
+ public static partial void Copy(nint dst, nint src, ulong n);
[LibraryImport("libc", EntryPoint = "sys_icache_invalidate", SetLastError = true)]
- public static partial void SysIcacheInvalidate(IntPtr start, IntPtr len);
+ public static partial void SysIcacheInvalidate(nint start, nint len);
}
}
diff --git a/src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs b/src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs
index a71074995..3cf279ae3 100644
--- a/src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Cache/NoWxCache.cs
@@ -23,7 +23,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
private readonly CacheMemoryAllocator _cacheAllocator;
public CacheMemoryAllocator Allocator => _cacheAllocator;
- public IntPtr Pointer => _region.Block.Pointer;
+ public nint Pointer => _region.Block.Pointer;
public MemoryCache(IJitMemoryAllocator allocator, ulong size)
{
@@ -110,10 +110,10 @@ namespace Ryujinx.Cpu.LightningJit.Cache
{
public readonly int Offset;
public readonly int Size;
- public readonly IntPtr FuncPtr;
+ public readonly nint FuncPtr;
private int _useCount;
- public ThreadLocalCacheEntry(int offset, int size, IntPtr funcPtr)
+ public ThreadLocalCacheEntry(int offset, int size, nint funcPtr)
{
Offset = offset;
Size = size;
@@ -140,9 +140,9 @@ namespace Ryujinx.Cpu.LightningJit.Cache
_lock = new();
}
- public unsafe IntPtr Map(IntPtr framePointer, ReadOnlySpan code, ulong guestAddress, ulong guestSize)
+ public unsafe nint Map(nint framePointer, ReadOnlySpan code, ulong guestAddress, ulong guestSize)
{
- if (TryGetThreadLocalFunction(guestAddress, out IntPtr funcPtr))
+ if (TryGetThreadLocalFunction(guestAddress, out nint funcPtr))
{
return funcPtr;
}
@@ -167,7 +167,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
}
}
- public unsafe IntPtr MapPageAligned(ReadOnlySpan code)
+ public unsafe nint MapPageAligned(ReadOnlySpan code)
{
lock (_lock)
{
@@ -179,7 +179,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
Debug.Assert((funcOffset & ((int)MemoryBlock.GetPageSize() - 1)) == 0);
- IntPtr funcPtr = _sharedCache.Pointer + funcOffset;
+ nint funcPtr = _sharedCache.Pointer + funcOffset;
code.CopyTo(new Span((void*)funcPtr, code.Length));
_sharedCache.ReprotectAsRx(funcOffset, sizeAligned);
@@ -188,7 +188,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
}
}
- private bool TryGetThreadLocalFunction(ulong guestAddress, out IntPtr funcPtr)
+ private bool TryGetThreadLocalFunction(ulong guestAddress, out nint funcPtr)
{
if ((_threadLocalCache ??= new()).TryGetValue(guestAddress, out var entry))
{
@@ -209,12 +209,12 @@ namespace Ryujinx.Cpu.LightningJit.Cache
return true;
}
- funcPtr = IntPtr.Zero;
+ funcPtr = nint.Zero;
return false;
}
- private void ClearThreadLocalCache(IntPtr framePointer)
+ private void ClearThreadLocalCache(nint framePointer)
{
// Try to delete functions that are already on the shared cache
// and no longer being executed.
@@ -296,14 +296,14 @@ namespace Ryujinx.Cpu.LightningJit.Cache
_threadLocalCache = null;
}
- private unsafe IntPtr AddThreadLocalFunction(ReadOnlySpan code, ulong guestAddress)
+ private unsafe nint AddThreadLocalFunction(ReadOnlySpan code, ulong guestAddress)
{
int alignedSize = BitUtils.AlignUp(code.Length, (int)MemoryBlock.GetPageSize());
int funcOffset = _localCache.Allocate(alignedSize);
Debug.Assert((funcOffset & (int)(MemoryBlock.GetPageSize() - 1)) == 0);
- IntPtr funcPtr = _localCache.Pointer + funcOffset;
+ nint funcPtr = _localCache.Pointer + funcOffset;
code.CopyTo(new Span((void*)funcPtr, code.Length));
(_threadLocalCache ??= new()).Add(guestAddress, new(funcOffset, code.Length, funcPtr));
diff --git a/src/Ryujinx.Cpu/LightningJit/CodeGen/Arm64/StackWalker.cs b/src/Ryujinx.Cpu/LightningJit/CodeGen/Arm64/StackWalker.cs
index 3b01e674b..3ce7c4f9c 100644
--- a/src/Ryujinx.Cpu/LightningJit/CodeGen/Arm64/StackWalker.cs
+++ b/src/Ryujinx.Cpu/LightningJit/CodeGen/Arm64/StackWalker.cs
@@ -6,13 +6,13 @@ namespace Ryujinx.Cpu.LightningJit.CodeGen.Arm64
{
class StackWalker : IStackWalker
{
- public IEnumerable GetCallStack(IntPtr framePointer, IntPtr codeRegionStart, int codeRegionSize, IntPtr codeRegion2Start, int codeRegion2Size)
+ public IEnumerable GetCallStack(nint framePointer, nint codeRegionStart, int codeRegionSize, nint codeRegion2Start, int codeRegion2Size)
{
List functionPointers = new();
while (true)
{
- IntPtr functionPointer = Marshal.ReadIntPtr(framePointer, IntPtr.Size);
+ nint functionPointer = Marshal.ReadIntPtr(framePointer, nint.Size);
if ((functionPointer < codeRegionStart || functionPointer >= codeRegionStart + codeRegionSize) &&
(functionPointer < codeRegion2Start || functionPointer >= codeRegion2Start + codeRegion2Size))
diff --git a/src/Ryujinx.Cpu/LightningJit/IStackWalker.cs b/src/Ryujinx.Cpu/LightningJit/IStackWalker.cs
index 2fddef659..375c09d26 100644
--- a/src/Ryujinx.Cpu/LightningJit/IStackWalker.cs
+++ b/src/Ryujinx.Cpu/LightningJit/IStackWalker.cs
@@ -5,6 +5,6 @@ namespace Ryujinx.Cpu.LightningJit
{
interface IStackWalker
{
- IEnumerable GetCallStack(IntPtr framePointer, IntPtr codeRegionStart, int codeRegionSize, IntPtr codeRegion2Start, int codeRegion2Size);
+ IEnumerable GetCallStack(nint framePointer, nint codeRegionStart, int codeRegionSize, nint codeRegion2Start, int codeRegion2Size);
}
}
diff --git a/src/Ryujinx.Cpu/LightningJit/NativeInterface.cs b/src/Ryujinx.Cpu/LightningJit/NativeInterface.cs
index da3ad9832..5f243c0ee 100644
--- a/src/Ryujinx.Cpu/LightningJit/NativeInterface.cs
+++ b/src/Ryujinx.Cpu/LightningJit/NativeInterface.cs
@@ -61,7 +61,7 @@ namespace Ryujinx.Cpu.LightningJit
return GetContext().CntpctEl0;
}
- public static ulong GetFunctionAddress(IntPtr framePointer, ulong address)
+ public static ulong GetFunctionAddress(nint framePointer, ulong address)
{
return (ulong)Context.Translator.GetOrTranslatePointer(framePointer, address, GetContext().ExecutionMode);
}
diff --git a/src/Ryujinx.Cpu/LightningJit/State/ExecutionContext.cs b/src/Ryujinx.Cpu/LightningJit/State/ExecutionContext.cs
index facb9142f..a366dcca6 100644
--- a/src/Ryujinx.Cpu/LightningJit/State/ExecutionContext.cs
+++ b/src/Ryujinx.Cpu/LightningJit/State/ExecutionContext.cs
@@ -10,7 +10,7 @@ namespace Ryujinx.Cpu.LightningJit.State
private readonly NativeContext _nativeContext;
- internal IntPtr NativeContextPtr => _nativeContext.BasePtr;
+ internal nint NativeContextPtr => _nativeContext.BasePtr;
private bool _interrupted;
private readonly ICounter _counter;
diff --git a/src/Ryujinx.Cpu/LightningJit/State/NativeContext.cs b/src/Ryujinx.Cpu/LightningJit/State/NativeContext.cs
index fdb8793de..9895c78c2 100644
--- a/src/Ryujinx.Cpu/LightningJit/State/NativeContext.cs
+++ b/src/Ryujinx.Cpu/LightningJit/State/NativeContext.cs
@@ -25,7 +25,7 @@ namespace Ryujinx.Cpu.LightningJit.State
private readonly IJitMemoryBlock _block;
- public IntPtr BasePtr => _block.Pointer;
+ public nint BasePtr => _block.Pointer;
public NativeContext(IJitMemoryAllocator allocator)
{
diff --git a/src/Ryujinx.Cpu/LightningJit/TranslatedFunction.cs b/src/Ryujinx.Cpu/LightningJit/TranslatedFunction.cs
index a4e2c7b93..df0f52b8c 100644
--- a/src/Ryujinx.Cpu/LightningJit/TranslatedFunction.cs
+++ b/src/Ryujinx.Cpu/LightningJit/TranslatedFunction.cs
@@ -4,10 +4,10 @@ namespace Ryujinx.Cpu.LightningJit
{
class TranslatedFunction
{
- public IntPtr FuncPointer { get; }
+ public nint FuncPointer { get; }
public ulong GuestSize { get; }
- public TranslatedFunction(IntPtr funcPointer, ulong guestSize)
+ public TranslatedFunction(nint funcPointer, ulong guestSize)
{
FuncPointer = funcPointer;
GuestSize = guestSize;
diff --git a/src/Ryujinx.Cpu/LightningJit/Translator.cs b/src/Ryujinx.Cpu/LightningJit/Translator.cs
index d62410253..b4710e34e 100644
--- a/src/Ryujinx.Cpu/LightningJit/Translator.cs
+++ b/src/Ryujinx.Cpu/LightningJit/Translator.cs
@@ -98,7 +98,7 @@ namespace Ryujinx.Cpu.LightningJit
_noWxCache?.ClearEntireThreadLocalCache();
}
- internal IntPtr GetOrTranslatePointer(IntPtr framePointer, ulong address, ExecutionMode mode)
+ internal nint GetOrTranslatePointer(nint framePointer, ulong address, ExecutionMode mode)
{
if (_noWxCache != null)
{
@@ -141,7 +141,7 @@ namespace Ryujinx.Cpu.LightningJit
private TranslatedFunction Translate(ulong address, ExecutionMode mode)
{
CompiledFunction func = Compile(address, mode);
- IntPtr funcPointer = JitCache.Map(func.Code);
+ nint funcPointer = JitCache.Map(func.Code);
return new TranslatedFunction(funcPointer, (ulong)func.GuestCodeLength);
}
diff --git a/src/Ryujinx.Cpu/LightningJit/TranslatorStubs.cs b/src/Ryujinx.Cpu/LightningJit/TranslatorStubs.cs
index 914712bb1..e88414d5e 100644
--- a/src/Ryujinx.Cpu/LightningJit/TranslatorStubs.cs
+++ b/src/Ryujinx.Cpu/LightningJit/TranslatorStubs.cs
@@ -10,31 +10,31 @@ using System.Runtime.InteropServices;
namespace Ryujinx.Cpu.LightningJit
{
- delegate void DispatcherFunction(IntPtr nativeContext, ulong startAddress);
+ delegate void DispatcherFunction(nint nativeContext, ulong startAddress);
///
/// Represents a stub manager.
///
class TranslatorStubs : IDisposable
{
- private delegate ulong GetFunctionAddressDelegate(IntPtr framePointer, ulong address);
+ private delegate ulong GetFunctionAddressDelegate(nint framePointer, ulong address);
- private readonly Lazy _slowDispatchStub;
+ private readonly Lazy _slowDispatchStub;
private bool _disposed;
private readonly AddressTable _functionTable;
private readonly NoWxCache _noWxCache;
private readonly GetFunctionAddressDelegate _getFunctionAddressRef;
- private readonly IntPtr _getFunctionAddress;
- private readonly Lazy _dispatchStub;
+ private readonly nint _getFunctionAddress;
+ private readonly Lazy _dispatchStub;
private readonly Lazy _dispatchLoop;
///
/// Gets the dispatch stub.
///
/// instance was disposed
- public IntPtr DispatchStub
+ public nint DispatchStub
{
get
{
@@ -48,7 +48,7 @@ namespace Ryujinx.Cpu.LightningJit
/// Gets the slow dispatch stub.
///
/// instance was disposed
- public IntPtr SlowDispatchStub
+ public nint SlowDispatchStub
{
get
{
@@ -138,7 +138,7 @@ namespace Ryujinx.Cpu.LightningJit
/// Generates a .
///
/// Generated
- private IntPtr GenerateDispatchStub()
+ private nint GenerateDispatchStub()
{
List branchToFallbackOffsets = new();
@@ -226,7 +226,7 @@ namespace Ryujinx.Cpu.LightningJit
/// Generates a .
///
/// Generated
- private IntPtr GenerateSlowDispatchStub()
+ private nint GenerateSlowDispatchStub()
{
CodeWriter writer = new();
@@ -350,12 +350,12 @@ namespace Ryujinx.Cpu.LightningJit
throw new PlatformNotSupportedException();
}
- IntPtr pointer = Map(writer.AsByteSpan());
+ nint pointer = Map(writer.AsByteSpan());
return Marshal.GetDelegateForFunctionPointer(pointer);
}
- private IntPtr Map(ReadOnlySpan code)
+ private nint Map(ReadOnlySpan code)
{
if (_noWxCache != null)
{
diff --git a/src/Ryujinx.Cpu/MemoryEhMeilleure.cs b/src/Ryujinx.Cpu/MemoryEhMeilleure.cs
index 379ace941..e9a3ac4aa 100644
--- a/src/Ryujinx.Cpu/MemoryEhMeilleure.cs
+++ b/src/Ryujinx.Cpu/MemoryEhMeilleure.cs
@@ -46,7 +46,7 @@ namespace Ryujinx.Cpu
_mirrorAddress = (ulong)addressSpaceMirror.Pointer;
ulong endAddressMirror = _mirrorAddress + addressSpace.Size;
- bool addedMirror = NativeSignalHandler.AddTrackedRegion((nuint)_mirrorAddress, (nuint)endAddressMirror, IntPtr.Zero);
+ bool addedMirror = NativeSignalHandler.AddTrackedRegion((nuint)_mirrorAddress, (nuint)endAddressMirror, nint.Zero);
if (!addedMirror)
{
diff --git a/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs b/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs
index 93e608329..2985f1c21 100644
--- a/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs
+++ b/src/Ryujinx.Cpu/Signal/NativeSignalHandler.cs
@@ -14,7 +14,7 @@ namespace Ryujinx.Cpu.Signal
public int IsActive;
public nuint RangeAddress;
public nuint RangeEndAddress;
- public IntPtr ActionPointer;
+ public nint ActionPointer;
}
[InlineArray(NativeSignalHandlerGenerator.MaxTrackedRanges)]
@@ -54,8 +54,8 @@ namespace Ryujinx.Cpu.Signal
static class NativeSignalHandler
{
- private static readonly IntPtr _handlerConfig;
- private static IntPtr _signalHandlerPtr;
+ private static readonly nint _handlerConfig;
+ private static nint _signalHandlerPtr;
private static MemoryBlock _codeBlock;
@@ -70,7 +70,7 @@ namespace Ryujinx.Cpu.Signal
config = new SignalHandlerConfig();
}
- public static void InitializeSignalHandler(Func customSignalHandlerFactory = null)
+ public static void InitializeSignalHandler(Func customSignalHandlerFactory = null)
{
if (_initialized)
{
@@ -111,7 +111,7 @@ namespace Ryujinx.Cpu.Signal
if (customSignalHandlerFactory != null)
{
- _signalHandlerPtr = customSignalHandlerFactory(IntPtr.Zero, _signalHandlerPtr);
+ _signalHandlerPtr = customSignalHandlerFactory(nint.Zero, _signalHandlerPtr);
}
WindowsSignalHandlerRegistration.RegisterExceptionHandler(_signalHandlerPtr);
@@ -121,7 +121,7 @@ namespace Ryujinx.Cpu.Signal
}
}
- private static IntPtr MapCode(ReadOnlySpan code)
+ private static nint MapCode(ReadOnlySpan code)
{
Debug.Assert(_codeBlock == null);
@@ -139,7 +139,7 @@ namespace Ryujinx.Cpu.Signal
return ref Unsafe.AsRef((void*)_handlerConfig);
}
- public static bool AddTrackedRegion(nuint address, nuint endAddress, IntPtr action)
+ public static bool AddTrackedRegion(nuint address, nuint endAddress, nint action)
{
Span ranges = GetConfigRef().Ranges;
diff --git a/src/Ryujinx.Cpu/Signal/UnixSignalHandlerRegistration.cs b/src/Ryujinx.Cpu/Signal/UnixSignalHandlerRegistration.cs
index e88a6c0f6..d40e7cdc9 100644
--- a/src/Ryujinx.Cpu/Signal/UnixSignalHandlerRegistration.cs
+++ b/src/Ryujinx.Cpu/Signal/UnixSignalHandlerRegistration.cs
@@ -14,10 +14,10 @@ namespace Ryujinx.Cpu.Signal
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SigAction
{
- public IntPtr sa_handler;
+ public nint sa_handler;
public SigSet sa_mask;
public int sa_flags;
- public IntPtr sa_restorer;
+ public nint sa_restorer;
}
private const int SIGSEGV = 11;
@@ -28,14 +28,14 @@ namespace Ryujinx.Cpu.Signal
private static partial int sigaction(int signum, ref SigAction sigAction, out SigAction oldAction);
[LibraryImport("libc", SetLastError = true)]
- private static partial int sigaction(int signum, IntPtr sigAction, out SigAction oldAction);
+ private static partial int sigaction(int signum, nint sigAction, out SigAction oldAction);
[LibraryImport("libc", SetLastError = true)]
private static partial int sigemptyset(ref SigSet set);
public static SigAction GetSegfaultExceptionHandler()
{
- int result = sigaction(SIGSEGV, IntPtr.Zero, out SigAction old);
+ int result = sigaction(SIGSEGV, nint.Zero, out SigAction old);
if (result != 0)
{
@@ -45,7 +45,7 @@ namespace Ryujinx.Cpu.Signal
return old;
}
- public static SigAction RegisterExceptionHandler(IntPtr action)
+ public static SigAction RegisterExceptionHandler(nint action)
{
SigAction sig = new()
{
diff --git a/src/Ryujinx.Cpu/Signal/WindowsSignalHandlerRegistration.cs b/src/Ryujinx.Cpu/Signal/WindowsSignalHandlerRegistration.cs
index 1fbce0f72..7ac15b816 100644
--- a/src/Ryujinx.Cpu/Signal/WindowsSignalHandlerRegistration.cs
+++ b/src/Ryujinx.Cpu/Signal/WindowsSignalHandlerRegistration.cs
@@ -6,17 +6,17 @@ namespace Ryujinx.Cpu.Signal
static partial class WindowsSignalHandlerRegistration
{
[LibraryImport("kernel32.dll")]
- private static partial IntPtr AddVectoredExceptionHandler(uint first, IntPtr handler);
+ private static partial nint AddVectoredExceptionHandler(uint first, nint handler);
[LibraryImport("kernel32.dll")]
- private static partial ulong RemoveVectoredExceptionHandler(IntPtr handle);
+ private static partial ulong RemoveVectoredExceptionHandler(nint handle);
- public static IntPtr RegisterExceptionHandler(IntPtr action)
+ public static nint RegisterExceptionHandler(nint action)
{
return AddVectoredExceptionHandler(1, action);
}
- public static bool RemoveExceptionHandler(IntPtr handle)
+ public static bool RemoveExceptionHandler(nint handle)
{
return RemoveVectoredExceptionHandler(handle) != 0;
}
diff --git a/src/Ryujinx.Graphics.Device/DeviceState.cs b/src/Ryujinx.Graphics.Device/DeviceState.cs
index 54178a414..0dd4f5904 100644
--- a/src/Ryujinx.Graphics.Device/DeviceState.cs
+++ b/src/Ryujinx.Graphics.Device/DeviceState.cs
@@ -81,7 +81,7 @@ namespace Ryujinx.Graphics.Device
{
uint alignedOffset = index * RegisterSize;
- var readCallback = Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_readCallbacks), (IntPtr)index);
+ var readCallback = Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_readCallbacks), (nint)index);
if (readCallback != null)
{
return readCallback();
@@ -106,7 +106,7 @@ namespace Ryujinx.Graphics.Device
GetRefIntAlignedUncheck(index) = data;
- Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_writeCallbacks), (IntPtr)index)?.Invoke(data);
+ Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_writeCallbacks), (nint)index)?.Invoke(data);
}
}
@@ -123,7 +123,7 @@ namespace Ryujinx.Graphics.Device
changed = storage != data;
storage = data;
- Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_writeCallbacks), (IntPtr)index)?.Invoke(data);
+ Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_writeCallbacks), (nint)index)?.Invoke(data);
}
else
{
@@ -153,13 +153,13 @@ namespace Ryujinx.Graphics.Device
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private ref T GetRefUnchecked(uint offset) where T : unmanaged
{
- return ref Unsafe.As(ref Unsafe.AddByteOffset(ref State, (IntPtr)offset));
+ return ref Unsafe.As(ref Unsafe.AddByteOffset(ref State, (nint)offset));
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private ref int GetRefIntAlignedUncheck(ulong index)
{
- return ref Unsafe.Add(ref Unsafe.As(ref State), (IntPtr)index);
+ return ref Unsafe.Add(ref Unsafe.As(ref State), (nint)index);
}
}
}
diff --git a/src/Ryujinx.Graphics.GAL/IRenderer.cs b/src/Ryujinx.Graphics.GAL/IRenderer.cs
index 85d0bd729..9b5e2cc42 100644
--- a/src/Ryujinx.Graphics.GAL/IRenderer.cs
+++ b/src/Ryujinx.Graphics.GAL/IRenderer.cs
@@ -13,6 +13,8 @@ namespace Ryujinx.Graphics.GAL
IPipeline Pipeline { get; }
IWindow Window { get; }
+
+ uint ProgramCount { get; }
void BackgroundContextAction(Action action, bool alwaysBackground = false);
diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs b/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs
index cc3d2e5c1..0bd3dc592 100644
--- a/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs
+++ b/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedRenderer.cs
@@ -55,6 +55,8 @@ namespace Ryujinx.Graphics.GAL.Multithreading
private int _refProducerPtr;
private int _refConsumerPtr;
+ public uint ProgramCount { get; set; } = 0;
+
private Action _interruptAction;
private readonly object _interruptLock = new();
@@ -307,6 +309,8 @@ namespace Ryujinx.Graphics.GAL.Multithreading
Programs.Add(request);
+ ProgramCount++;
+
New().Set(Ref((IProgramRequest)request));
QueueCommand();
diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdateTracker.cs b/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdateTracker.cs
index effcb7bbb..ea9fc9e31 100644
--- a/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdateTracker.cs
+++ b/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdateTracker.cs
@@ -109,7 +109,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
if (index < BlockSize)
{
- int groupIndex = Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_registerToGroupMapping), (IntPtr)index);
+ int groupIndex = Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_registerToGroupMapping), (nint)index);
if (groupIndex != 0)
{
groupIndex--;
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs
index 33f227edb..5c9e3989b 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/FFmpegContext.cs
@@ -91,7 +91,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg
FFmpegApi.av_log_format_line(ptr, level, format, vl, lineBuffer, lineSize, &printPrefix);
- string line = Marshal.PtrToStringAnsi((IntPtr)lineBuffer).Trim();
+ string line = Marshal.PtrToStringAnsi((nint)lineBuffer).Trim();
switch (level)
{
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodec.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodec.cs
index 0267000c8..b5ef710b1 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodec.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodec.cs
@@ -12,15 +12,15 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public int Capabilities;
public byte MaxLowRes;
public unsafe AVRational* SupportedFramerates;
- public IntPtr PixFmts;
- public IntPtr SupportedSamplerates;
- public IntPtr SampleFmts;
+ public nint PixFmts;
+ public nint SupportedSamplerates;
+ public nint SampleFmts;
// Deprecated
public unsafe ulong* ChannelLayouts;
- public unsafe IntPtr PrivClass;
- public IntPtr Profiles;
+ public unsafe nint PrivClass;
+ public nint Profiles;
public unsafe byte* WrapperName;
- public IntPtr ChLayouts;
+ public nint ChLayouts;
#pragma warning restore CS0649
}
}
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodec501.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodec501.cs
index 9084f4024..d745e9f04 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodec501.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodec501.cs
@@ -12,13 +12,13 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public int Capabilities;
public byte MaxLowRes;
public unsafe AVRational* SupportedFramerates;
- public IntPtr PixFmts;
- public IntPtr SupportedSamplerates;
- public IntPtr SampleFmts;
+ public nint PixFmts;
+ public nint SupportedSamplerates;
+ public nint SampleFmts;
// Deprecated
public unsafe ulong* ChannelLayouts;
- public unsafe IntPtr PrivClass;
- public IntPtr Profiles;
+ public unsafe nint PrivClass;
+ public nint Profiles;
public unsafe byte* WrapperName;
#pragma warning restore CS0649
}
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodecContext.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodecContext.cs
index c743ab33e..1de0a13e4 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodecContext.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVCodecContext.cs
@@ -6,22 +6,22 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
struct AVCodecContext
{
#pragma warning disable CS0649 // Field is never assigned to
- public unsafe IntPtr AvClass;
+ public unsafe nint AvClass;
public int LogLevelOffset;
public int CodecType;
public unsafe AVCodec* Codec;
public AVCodecID CodecId;
public uint CodecTag;
- public IntPtr PrivData;
- public IntPtr Internal;
- public IntPtr Opaque;
+ public nint PrivData;
+ public nint Internal;
+ public nint Opaque;
public long BitRate;
public int BitRateTolerance;
public int GlobalQuality;
public int CompressionLevel;
public int Flags;
public int Flags2;
- public IntPtr ExtraData;
+ public nint ExtraData;
public int ExtraDataSize;
public AVRational TimeBase;
public int TicksPerFrame;
@@ -32,8 +32,8 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public int CodedHeight;
public int GopSize;
public int PixFmt;
- public IntPtr DrawHorizBand;
- public IntPtr GetFormat;
+ public nint DrawHorizBand;
+ public nint GetFormat;
public int MaxBFrames;
public float BQuantFactor;
public float BQuantOffset;
@@ -46,7 +46,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public float PMasking;
public float DarkMasking;
public int SliceCount;
- public IntPtr SliceOffset;
+ public nint SliceOffset;
public AVRational SampleAspectRatio;
public int MeCmp;
public int MeSubCmp;
@@ -60,8 +60,8 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public int MeRange;
public int SliceFlags;
public int MbDecision;
- public IntPtr IntraMatrix;
- public IntPtr InterMatrix;
+ public nint IntraMatrix;
+ public nint InterMatrix;
public int IntraDcPrecision;
public int SkipTop;
public int SkipBottom;
@@ -89,7 +89,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public ulong RequestChannelLayout;
public int AudioServiceType;
public int RequestSampleFmt;
- public IntPtr GetBuffer2;
+ public nint GetBuffer2;
public float QCompress;
public float QBlur;
public int QMin;
@@ -97,23 +97,23 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public int MaxQdiff;
public int RcBufferSize;
public int RcOverrideCount;
- public IntPtr RcOverride;
+ public nint RcOverride;
public long RcMaxRate;
public long RcMinRate;
public float RcMax_available_vbv_use;
public float RcMin_vbv_overflow_use;
public int RcInitialBufferOccupancy;
public int Trellis;
- public IntPtr StatsOut;
- public IntPtr StatsIn;
+ public nint StatsOut;
+ public nint StatsIn;
public int WorkaroundBugs;
public int StrictStdCompliance;
public int ErrorConcealment;
public int Debug;
public int ErrRecognition;
public long ReorderedOpaque;
- public IntPtr HwAccel;
- public IntPtr HwAccelContext;
+ public nint HwAccel;
+ public nint HwAccelContext;
public Array8 Error;
public int DctAlgo;
public int IdctAlgo;
@@ -124,48 +124,48 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public int ThreadType;
public int ActiveThreadType;
public int ThreadSafeCallbacks;
- public IntPtr Execute;
- public IntPtr Execute2;
+ public nint Execute;
+ public nint Execute2;
public int NsseWeight;
public int Profile;
public int Level;
public int SkipLoopFilter;
public int SkipIdct;
public int SkipFrame;
- public IntPtr SubtitleHeader;
+ public nint SubtitleHeader;
public int SubtitleHeaderSize;
public int InitialPadding;
public AVRational Framerate;
public int SwPixFmt;
public AVRational PktTimebase;
- public IntPtr CodecDescriptor;
+ public nint CodecDescriptor;
public long PtsCorrectionNumFaultyPts;
public long PtsCorrectionNumFaultyDts;
public long PtsCorrectionLastPts;
public long PtsCorrectionLastDts;
- public IntPtr SubCharenc;
+ public nint SubCharenc;
public int SubCharencMode;
public int SkipAlpha;
public int SeekPreroll;
public int DebugMv;
- public IntPtr ChromaIntraMatrix;
- public IntPtr DumpSeparator;
- public IntPtr CodecWhitelist;
+ public nint ChromaIntraMatrix;
+ public nint DumpSeparator;
+ public nint CodecWhitelist;
public uint Properties;
- public IntPtr CodedSideData;
+ public nint CodedSideData;
public int NbCodedSideData;
- public IntPtr HwFramesCtx;
+ public nint HwFramesCtx;
public int SubTextFormat;
public int TrailingPadding;
public long MaxPixels;
- public IntPtr HwDeviceCtx;
+ public nint HwDeviceCtx;
public int HwAccelFlags;
public int applyCropping;
public int ExtraHwFrames;
public int DiscardDamagedPercentage;
public long MaxSamples;
public int ExportSideData;
- public IntPtr GetEncodeBuffer;
+ public nint GetEncodeBuffer;
#pragma warning restore CS0649
}
}
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVFrame.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVFrame.cs
index a1eb7a090..97c30c718 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVFrame.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/AVFrame.cs
@@ -6,9 +6,9 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
struct AVFrame
{
#pragma warning disable CS0649 // Field is never assigned to
- public Array8 Data;
+ public Array8 Data;
public Array8 LineSize;
- public IntPtr ExtendedData;
+ public nint ExtendedData;
public int Width;
public int Height;
public int NumSamples;
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public int CodedPictureNumber;
public int DisplayPictureNumber;
public int Quality;
- public IntPtr Opaque;
+ public nint Opaque;
public int RepeatPicture;
public int InterlacedFrame;
public int TopFieldFirst;
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFCodec.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFCodec.cs
index ceb8a3b01..95926298c 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFCodec.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFCodec.cs
@@ -8,12 +8,12 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public T Base;
public int CapsInternalOrCbType;
public int PrivDataSize;
- public IntPtr UpdateThreadContext;
- public IntPtr UpdateThreadContextForUser;
- public IntPtr Defaults;
- public IntPtr InitStaticData;
- public IntPtr Init;
- public IntPtr CodecCallback;
+ public nint UpdateThreadContext;
+ public nint UpdateThreadContextForUser;
+ public nint Defaults;
+ public nint InitStaticData;
+ public nint Init;
+ public nint CodecCallback;
#pragma warning restore CS0649
// NOTE: There is more after, but the layout kind of changed a bit and we don't need more than this. This is safe as we only manipulate this behind a reference.
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFCodecLegacy.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFCodecLegacy.cs
index 03eba311c..873d2518a 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFCodecLegacy.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFCodecLegacy.cs
@@ -8,14 +8,14 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
public T Base;
public uint CapsInternalOrCbType;
public int PrivDataSize;
- public IntPtr UpdateThreadContext;
- public IntPtr UpdateThreadContextForUser;
- public IntPtr Defaults;
- public IntPtr InitStaticData;
- public IntPtr Init;
- public IntPtr EncodeSub;
- public IntPtr Encode2;
- public IntPtr Decode;
+ public nint UpdateThreadContext;
+ public nint UpdateThreadContextForUser;
+ public nint Defaults;
+ public nint InitStaticData;
+ public nint Init;
+ public nint EncodeSub;
+ public nint Encode2;
+ public nint Decode;
#pragma warning restore CS0649
// NOTE: There is more after, but the layout kind of changed a bit and we don't need more than this. This is safe as we only manipulate this behind a reference.
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs
index 5167ff9fe..7b0c2a8ad 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Native/FFmpegApi.cs
@@ -37,9 +37,9 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
}
- private static bool TryLoadWhitelistedLibrary(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, out IntPtr handle)
+ private static bool TryLoadWhitelistedLibrary(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, out nint handle)
{
- handle = IntPtr.Zero;
+ handle = nint.Zero;
if (_librariesWhitelist.TryGetValue(libraryName, out var value))
{
@@ -71,7 +71,7 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg.Native
return handle;
}
- return IntPtr.Zero;
+ return nint.Zero;
});
}
diff --git a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Surface.cs b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Surface.cs
index 65fb7b4ad..c13cfe1aa 100644
--- a/src/Ryujinx.Graphics.Nvdec.FFmpeg/Surface.cs
+++ b/src/Ryujinx.Graphics.Nvdec.FFmpeg/Surface.cs
@@ -11,9 +11,9 @@ namespace Ryujinx.Graphics.Nvdec.FFmpeg
public int RequestedWidth { get; }
public int RequestedHeight { get; }
- public Plane YPlane => new((IntPtr)Frame->Data[0], Stride * Height);
- public Plane UPlane => new((IntPtr)Frame->Data[1], UvStride * UvHeight);
- public Plane VPlane => new((IntPtr)Frame->Data[2], UvStride * UvHeight);
+ public Plane YPlane => new((nint)Frame->Data[0], Stride * Height);
+ public Plane UPlane => new((nint)Frame->Data[1], UvStride * UvHeight);
+ public Plane VPlane => new((nint)Frame->Data[2], UvStride * UvHeight);
public FrameField Field => Frame->InterlacedFrame != 0 ? FrameField.Interlaced : FrameField.Progressive;
diff --git a/src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs b/src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs
index c75cfeb0f..18ed172f8 100644
--- a/src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs
+++ b/src/Ryujinx.Graphics.Nvdec.Vp9/Common/MemoryAllocator.cs
@@ -11,7 +11,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
private struct PoolItem
{
- public IntPtr Pointer;
+ public nint Pointer;
public int Length;
public bool InUse;
}
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
{
int lengthInBytes = Unsafe.SizeOf() * length;
- IntPtr ptr = IntPtr.Zero;
+ nint ptr = nint.Zero;
for (int i = 0; i < PoolEntries; i++)
{
@@ -36,7 +36,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
}
}
- if (ptr == IntPtr.Zero)
+ if (ptr == nint.Zero)
{
ptr = Marshal.AllocHGlobal(lengthInBytes);
@@ -47,7 +47,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
if (!item.InUse)
{
item.InUse = true;
- if (item.Pointer != IntPtr.Zero)
+ if (item.Pointer != nint.Zero)
{
Marshal.FreeHGlobal(item.Pointer);
}
@@ -63,7 +63,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
public unsafe void Free(ArrayPtr arr) where T : unmanaged
{
- IntPtr ptr = (IntPtr)arr.ToPointer();
+ nint ptr = (nint)arr.ToPointer();
for (int i = 0; i < PoolEntries; i++)
{
@@ -83,10 +83,10 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Common
{
ref PoolItem item = ref _pool[i];
- if (item.Pointer != IntPtr.Zero)
+ if (item.Pointer != nint.Zero)
{
Marshal.FreeHGlobal(item.Pointer);
- item.Pointer = IntPtr.Zero;
+ item.Pointer = nint.Zero;
}
}
}
diff --git a/src/Ryujinx.Graphics.Nvdec.Vp9/Types/Surface.cs b/src/Ryujinx.Graphics.Nvdec.Vp9/Types/Surface.cs
index 372b1d2b4..d9bda185b 100644
--- a/src/Ryujinx.Graphics.Nvdec.Vp9/Types/Surface.cs
+++ b/src/Ryujinx.Graphics.Nvdec.Vp9/Types/Surface.cs
@@ -11,9 +11,9 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
public ArrayPtr UBuffer;
public ArrayPtr VBuffer;
- public readonly unsafe Plane YPlane => new((IntPtr)YBuffer.ToPointer(), YBuffer.Length);
- public readonly unsafe Plane UPlane => new((IntPtr)UBuffer.ToPointer(), UBuffer.Length);
- public readonly unsafe Plane VPlane => new((IntPtr)VBuffer.ToPointer(), VBuffer.Length);
+ public readonly unsafe Plane YPlane => new((nint)YBuffer.ToPointer(), YBuffer.Length);
+ public readonly unsafe Plane UPlane => new((nint)UBuffer.ToPointer(), UBuffer.Length);
+ public readonly unsafe Plane VPlane => new((nint)VBuffer.ToPointer(), VBuffer.Length);
public readonly FrameField Field => FrameField.Progressive;
@@ -30,7 +30,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
public bool HighBd { get; }
- private readonly IntPtr _pointer;
+ private readonly nint _pointer;
public Surface(int width, int height)
{
@@ -53,7 +53,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
int frameSize = (HighBd ? 2 : 1) * (yplaneSize + 2 * uvplaneSize);
- IntPtr pointer = Marshal.AllocHGlobal(frameSize);
+ nint pointer = Marshal.AllocHGlobal(frameSize);
_pointer = pointer;
Width = width;
Height = height;
diff --git a/src/Ryujinx.Graphics.OpenGL/Buffer.cs b/src/Ryujinx.Graphics.OpenGL/Buffer.cs
index 2a5143101..33ca25174 100644
--- a/src/Ryujinx.Graphics.OpenGL/Buffer.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Buffer.cs
@@ -19,11 +19,11 @@ namespace Ryujinx.Graphics.OpenGL
GL.ClearBufferSubData(
BufferTarget.CopyWriteBuffer,
PixelInternalFormat.Rgba8ui,
- (IntPtr)offset,
- (IntPtr)size,
+ (nint)offset,
+ (nint)size,
PixelFormat.RgbaInteger,
PixelType.UnsignedByte,
- (IntPtr)valueArr);
+ (nint)valueArr);
}
}
@@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.OpenGL
int handle = GL.GenBuffer();
GL.BindBuffer(BufferTarget.CopyWriteBuffer, handle);
- GL.BufferData(BufferTarget.CopyWriteBuffer, size, IntPtr.Zero, BufferUsageHint.DynamicDraw);
+ GL.BufferData(BufferTarget.CopyWriteBuffer, size, nint.Zero, BufferUsageHint.DynamicDraw);
return Handle.FromInt32(handle);
}
@@ -47,7 +47,7 @@ namespace Ryujinx.Graphics.OpenGL
int handle = GL.GenBuffer();
GL.BindBuffer(BufferTarget.CopyWriteBuffer, handle);
- GL.BufferStorage(BufferTarget.CopyWriteBuffer, size, IntPtr.Zero,
+ GL.BufferStorage(BufferTarget.CopyWriteBuffer, size, nint.Zero,
BufferStorageFlags.MapPersistentBit |
BufferStorageFlags.MapCoherentBit |
BufferStorageFlags.ClientStorageBit |
@@ -64,9 +64,9 @@ namespace Ryujinx.Graphics.OpenGL
GL.CopyBufferSubData(
BufferTarget.CopyReadBuffer,
BufferTarget.CopyWriteBuffer,
- (IntPtr)srcOffset,
- (IntPtr)dstOffset,
- (IntPtr)size);
+ (nint)srcOffset,
+ (nint)dstOffset,
+ (nint)size);
}
public static unsafe PinnedSpan GetData(OpenGLRenderer renderer, BufferHandle buffer, int offset, int size)
@@ -74,9 +74,9 @@ namespace Ryujinx.Graphics.OpenGL
// Data in the persistent buffer and host array is guaranteed to be available
// until the next time the host thread requests data.
- if (renderer.PersistentBuffers.TryGet(buffer, out IntPtr ptr))
+ if (renderer.PersistentBuffers.TryGet(buffer, out nint ptr))
{
- return new PinnedSpan(IntPtr.Add(ptr, offset).ToPointer(), size);
+ return new PinnedSpan(nint.Add(ptr, offset).ToPointer(), size);
}
else if (HwCapabilities.UsePersistentBufferForFlush)
{
@@ -84,11 +84,11 @@ namespace Ryujinx.Graphics.OpenGL
}
else
{
- IntPtr target = renderer.PersistentBuffers.Default.GetHostArray(size);
+ nint target = renderer.PersistentBuffers.Default.GetHostArray(size);
GL.BindBuffer(BufferTarget.CopyReadBuffer, buffer.ToInt32());
- GL.GetBufferSubData(BufferTarget.CopyReadBuffer, (IntPtr)offset, size, target);
+ GL.GetBufferSubData(BufferTarget.CopyReadBuffer, (nint)offset, size, target);
return new PinnedSpan(target.ToPointer(), size);
}
@@ -97,7 +97,7 @@ namespace Ryujinx.Graphics.OpenGL
public static void Resize(BufferHandle handle, int size)
{
GL.BindBuffer(BufferTarget.CopyWriteBuffer, handle.ToInt32());
- GL.BufferData(BufferTarget.CopyWriteBuffer, size, IntPtr.Zero, BufferUsageHint.StreamCopy);
+ GL.BufferData(BufferTarget.CopyWriteBuffer, size, nint.Zero, BufferUsageHint.StreamCopy);
}
public static void SetData(BufferHandle buffer, int offset, ReadOnlySpan data)
@@ -108,7 +108,7 @@ namespace Ryujinx.Graphics.OpenGL
{
fixed (byte* ptr = data)
{
- GL.BufferSubData(BufferTarget.CopyWriteBuffer, (IntPtr)offset, data.Length, (IntPtr)ptr);
+ GL.BufferSubData(BufferTarget.CopyWriteBuffer, (nint)offset, data.Length, (nint)ptr);
}
}
}
diff --git a/src/Ryujinx.Graphics.OpenGL/Debugger.cs b/src/Ryujinx.Graphics.OpenGL/Debugger.cs
index 7606bdbfd..c700b3b7c 100644
--- a/src/Ryujinx.Graphics.OpenGL/Debugger.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Debugger.cs
@@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.OpenGL
if (logLevel == GraphicsDebugLevel.None)
{
GL.Disable(EnableCap.DebugOutputSynchronous);
- GL.DebugMessageCallback(null, IntPtr.Zero);
+ GL.DebugMessageCallback(null, nint.Zero);
return;
}
@@ -45,7 +45,7 @@ namespace Ryujinx.Graphics.OpenGL
_counter = 0;
_debugCallback = GLDebugHandler;
- GL.DebugMessageCallback(_debugCallback, IntPtr.Zero);
+ GL.DebugMessageCallback(_debugCallback, nint.Zero);
Logger.Warning?.Print(LogClass.Gpu, "OpenGL Debugging is enabled. Performance will be negatively impacted.");
}
@@ -56,8 +56,8 @@ namespace Ryujinx.Graphics.OpenGL
int id,
DebugSeverity severity,
int length,
- IntPtr message,
- IntPtr userParam)
+ nint message,
+ nint userParam)
{
string msg = Marshal.PtrToStringUTF8(message).Replace('\n', ' ');
diff --git a/src/Ryujinx.Graphics.OpenGL/Helper/GLXHelper.cs b/src/Ryujinx.Graphics.OpenGL/Helper/GLXHelper.cs
index ce2b20f7d..b722bbf04 100644
--- a/src/Ryujinx.Graphics.OpenGL/Helper/GLXHelper.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Helper/GLXHelper.cs
@@ -15,14 +15,14 @@ namespace Ryujinx.Graphics.OpenGL.Helper
{
if (name != LibraryName)
{
- return IntPtr.Zero;
+ return nint.Zero;
}
- if (!NativeLibrary.TryLoad("libGL.so.1", assembly, path, out IntPtr result))
+ if (!NativeLibrary.TryLoad("libGL.so.1", assembly, path, out nint result))
{
if (!NativeLibrary.TryLoad("libGL.so", assembly, path, out result))
{
- return IntPtr.Zero;
+ return nint.Zero;
}
}
@@ -31,6 +31,6 @@ namespace Ryujinx.Graphics.OpenGL.Helper
}
[LibraryImport(LibraryName, EntryPoint = "glXGetCurrentContext")]
- public static partial IntPtr GetCurrentContext();
+ public static partial nint GetCurrentContext();
}
}
diff --git a/src/Ryujinx.Graphics.OpenGL/Helper/WGLHelper.cs b/src/Ryujinx.Graphics.OpenGL/Helper/WGLHelper.cs
index be12ff999..7072bbd9f 100644
--- a/src/Ryujinx.Graphics.OpenGL/Helper/WGLHelper.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Helper/WGLHelper.cs
@@ -10,6 +10,6 @@ namespace Ryujinx.Graphics.OpenGL.Helper
private const string LibraryName = "OPENGL32.DLL";
[LibraryImport(LibraryName, EntryPoint = "wglGetCurrentContext")]
- public static partial IntPtr GetCurrentContext();
+ public static partial nint GetCurrentContext();
}
}
diff --git a/src/Ryujinx.Graphics.OpenGL/Image/TextureBuffer.cs b/src/Ryujinx.Graphics.OpenGL/Image/TextureBuffer.cs
index 22f4c04cd..8e728a2bb 100644
--- a/src/Ryujinx.Graphics.OpenGL/Image/TextureBuffer.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Image/TextureBuffer.cs
@@ -97,7 +97,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
SizedInternalFormat format = (SizedInternalFormat)FormatTable.GetFormatInfo(Info.Format).PixelInternalFormat;
- GL.TexBufferRange(TextureBufferTarget.TextureBuffer, format, _buffer.ToInt32(), (IntPtr)buffer.Offset, buffer.Size);
+ GL.TexBufferRange(TextureBufferTarget.TextureBuffer, format, _buffer.ToInt32(), (nint)buffer.Offset, buffer.Size);
}
public void Dispose()
diff --git a/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs b/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs
index 89bd5e4ff..e08da7013 100644
--- a/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs
@@ -464,7 +464,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
_copyPboSize = requiredSize;
GL.BindBuffer(BufferTarget.PixelPackBuffer, _copyPboHandle);
- GL.BufferData(BufferTarget.PixelPackBuffer, requiredSize, IntPtr.Zero, BufferUsageHint.DynamicCopy);
+ GL.BufferData(BufferTarget.PixelPackBuffer, requiredSize, nint.Zero, BufferUsageHint.DynamicCopy);
}
}
diff --git a/src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs b/src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
index b0859c49e..a89dd5131 100644
--- a/src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Image/TextureView.cs
@@ -282,7 +282,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
}
else
{
- IntPtr target = _renderer.PersistentBuffers.Default.GetHostArray(size);
+ nint target = _renderer.PersistentBuffers.Default.GetHostArray(size);
WriteTo(target);
@@ -307,7 +307,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
}
else
{
- IntPtr target = _renderer.PersistentBuffers.Default.GetHostArray(size);
+ nint target = _renderer.PersistentBuffers.Default.GetHostArray(size);
int offset = WriteTo2D(target, layer, level);
@@ -339,15 +339,15 @@ namespace Ryujinx.Graphics.OpenGL.Image
public void WriteToPbo(int offset, bool forceBgra)
{
- WriteTo(IntPtr.Zero + offset, forceBgra);
+ WriteTo(nint.Zero + offset, forceBgra);
}
public int WriteToPbo2D(int offset, int layer, int level)
{
- return WriteTo2D(IntPtr.Zero + offset, layer, level);
+ return WriteTo2D(nint.Zero + offset, layer, level);
}
- private int WriteTo2D(IntPtr data, int layer, int level)
+ private int WriteTo2D(nint data, int layer, int level)
{
TextureTarget target = Target.Convert();
@@ -390,7 +390,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
return 0;
}
- private void WriteTo(IntPtr data, bool forceBgra = false)
+ private void WriteTo(nint data, bool forceBgra = false)
{
TextureTarget target = Target.Convert();
@@ -457,7 +457,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
var dataSpan = data.Span;
fixed (byte* ptr = dataSpan)
{
- ReadFrom((IntPtr)ptr, dataSpan.Length);
+ ReadFrom((nint)ptr, dataSpan.Length);
}
}
}
@@ -474,7 +474,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
int width = Math.Max(Info.Width >> level, 1);
int height = Math.Max(Info.Height >> level, 1);
- ReadFrom2D((IntPtr)ptr, layer, level, 0, 0, width, height);
+ ReadFrom2D((nint)ptr, layer, level, 0, 0, width, height);
}
}
}
@@ -492,7 +492,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
fixed (byte* ptr = data.Span)
{
ReadFrom2D(
- (IntPtr)ptr,
+ (nint)ptr,
layer,
level,
region.X,
@@ -507,15 +507,15 @@ namespace Ryujinx.Graphics.OpenGL.Image
public void ReadFromPbo(int offset, int size)
{
- ReadFrom(IntPtr.Zero + offset, size);
+ ReadFrom(nint.Zero + offset, size);
}
public void ReadFromPbo2D(int offset, int layer, int level, int width, int height)
{
- ReadFrom2D(IntPtr.Zero + offset, layer, level, 0, 0, width, height);
+ ReadFrom2D(nint.Zero + offset, layer, level, 0, 0, width, height);
}
- private void ReadFrom2D(IntPtr data, int layer, int level, int x, int y, int width, int height)
+ private void ReadFrom2D(nint data, int layer, int level, int x, int y, int width, int height)
{
int mipSize = Info.GetMipSize2D(level);
@@ -535,7 +535,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
return data;
}
- private void ReadFrom2D(IntPtr data, int layer, int level, int x, int y, int width, int height, int mipSize)
+ private void ReadFrom2D(nint data, int layer, int level, int x, int y, int width, int height, int mipSize)
{
TextureTarget target = Target.Convert();
@@ -694,7 +694,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
}
}
- private void ReadFrom(IntPtr data, int size)
+ private void ReadFrom(nint data, int size)
{
TextureTarget target = Target.Convert();
int baseLevel = 0;
diff --git a/src/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs b/src/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs
index 377cad386..2deee045c 100644
--- a/src/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs
+++ b/src/Ryujinx.Graphics.OpenGL/OpenGLRenderer.cs
@@ -29,6 +29,8 @@ namespace Ryujinx.Graphics.OpenGL
private readonly Sync _sync;
+ public uint ProgramCount { get; set; } = 0;
+
public event EventHandler ScreenCaptured;
internal PersistentBuffers PersistentBuffers { get; }
@@ -94,6 +96,8 @@ namespace Ryujinx.Graphics.OpenGL
public IProgram CreateProgram(ShaderSource[] shaders, ShaderInfo info)
{
+ ProgramCount++;
+
return new Program(shaders, info.FragmentOutputMap);
}
diff --git a/src/Ryujinx.Graphics.OpenGL/PersistentBuffers.cs b/src/Ryujinx.Graphics.OpenGL/PersistentBuffers.cs
index ebfe3ad64..28ebe88a5 100644
--- a/src/Ryujinx.Graphics.OpenGL/PersistentBuffers.cs
+++ b/src/Ryujinx.Graphics.OpenGL/PersistentBuffers.cs
@@ -14,7 +14,7 @@ namespace Ryujinx.Graphics.OpenGL
private readonly PersistentBuffer _main = new();
private readonly PersistentBuffer _background = new();
- private readonly Dictionary _maps = new();
+ private readonly Dictionary _maps = new();
public PersistentBuffer Default => BackgroundContextWorker.InBackground ? _background : _main;
@@ -27,7 +27,7 @@ namespace Ryujinx.Graphics.OpenGL
public void Map(BufferHandle handle, int size)
{
GL.BindBuffer(BufferTarget.CopyWriteBuffer, handle.ToInt32());
- IntPtr ptr = GL.MapBufferRange(BufferTarget.CopyWriteBuffer, IntPtr.Zero, size, BufferAccessMask.MapReadBit | BufferAccessMask.MapPersistentBit);
+ nint ptr = GL.MapBufferRange(BufferTarget.CopyWriteBuffer, nint.Zero, size, BufferAccessMask.MapReadBit | BufferAccessMask.MapPersistentBit);
_maps[handle] = ptr;
}
@@ -43,7 +43,7 @@ namespace Ryujinx.Graphics.OpenGL
}
}
- public bool TryGet(BufferHandle handle, out IntPtr ptr)
+ public bool TryGet(BufferHandle handle, out nint ptr)
{
return _maps.TryGetValue(handle, out ptr);
}
@@ -51,12 +51,12 @@ namespace Ryujinx.Graphics.OpenGL
class PersistentBuffer : IDisposable
{
- private IntPtr _bufferMap;
+ private nint _bufferMap;
private int _copyBufferHandle;
private int _copyBufferSize;
private byte[] _data;
- private IntPtr _dataMap;
+ private nint _dataMap;
private void EnsureBuffer(int requiredSize)
{
@@ -73,19 +73,19 @@ namespace Ryujinx.Graphics.OpenGL
_copyBufferSize = requiredSize;
GL.BindBuffer(BufferTarget.CopyWriteBuffer, _copyBufferHandle);
- GL.BufferStorage(BufferTarget.CopyWriteBuffer, requiredSize, IntPtr.Zero, BufferStorageFlags.MapReadBit | BufferStorageFlags.MapPersistentBit);
+ GL.BufferStorage(BufferTarget.CopyWriteBuffer, requiredSize, nint.Zero, BufferStorageFlags.MapReadBit | BufferStorageFlags.MapPersistentBit);
- _bufferMap = GL.MapBufferRange(BufferTarget.CopyWriteBuffer, IntPtr.Zero, requiredSize, BufferAccessMask.MapReadBit | BufferAccessMask.MapPersistentBit);
+ _bufferMap = GL.MapBufferRange(BufferTarget.CopyWriteBuffer, nint.Zero, requiredSize, BufferAccessMask.MapReadBit | BufferAccessMask.MapPersistentBit);
}
}
- public unsafe IntPtr GetHostArray(int requiredSize)
+ public unsafe nint GetHostArray(int requiredSize)
{
if (_data == null || _data.Length < requiredSize)
{
_data = GC.AllocateUninitializedArray(requiredSize, true);
- _dataMap = (IntPtr)Unsafe.AsPointer(ref MemoryMarshal.GetArrayDataReference(_data));
+ _dataMap = (nint)Unsafe.AsPointer(ref MemoryMarshal.GetArrayDataReference(_data));
}
return _dataMap;
@@ -95,7 +95,7 @@ namespace Ryujinx.Graphics.OpenGL
{
GL.MemoryBarrier(MemoryBarrierFlags.ClientMappedBufferBarrierBit);
- IntPtr sync = GL.FenceSync(SyncCondition.SyncGpuCommandsComplete, WaitSyncFlags.None);
+ nint sync = GL.FenceSync(SyncCondition.SyncGpuCommandsComplete, WaitSyncFlags.None);
WaitSyncStatus syncResult = GL.ClientWaitSync(sync, ClientWaitSyncFlags.SyncFlushCommandsBit, 1000000000);
if (syncResult == WaitSyncStatus.TimeoutExpired)
@@ -143,7 +143,7 @@ namespace Ryujinx.Graphics.OpenGL
GL.BindBuffer(BufferTarget.CopyReadBuffer, buffer.ToInt32());
GL.BindBuffer(BufferTarget.CopyWriteBuffer, _copyBufferHandle);
- GL.CopyBufferSubData(BufferTarget.CopyReadBuffer, BufferTarget.CopyWriteBuffer, (IntPtr)offset, IntPtr.Zero, size);
+ GL.CopyBufferSubData(BufferTarget.CopyReadBuffer, BufferTarget.CopyWriteBuffer, (nint)offset, nint.Zero, size);
GL.BindBuffer(BufferTarget.CopyWriteBuffer, 0);
diff --git a/src/Ryujinx.Graphics.OpenGL/Pipeline.cs b/src/Ryujinx.Graphics.OpenGL/Pipeline.cs
index 27aacac15..096e2e5eb 100644
--- a/src/Ryujinx.Graphics.OpenGL/Pipeline.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Pipeline.cs
@@ -23,7 +23,7 @@ namespace Ryujinx.Graphics.OpenGL
private VertexArray _vertexArray;
private Framebuffer _framebuffer;
- private IntPtr _indexBaseOffset;
+ private nint _indexBaseOffset;
private DrawElementsType _elementsType;
@@ -358,7 +358,7 @@ namespace Ryujinx.Graphics.OpenGL
break;
}
- IntPtr indexBaseOffset = _indexBaseOffset + firstIndex * indexElemSize;
+ nint indexBaseOffset = _indexBaseOffset + firstIndex * indexElemSize;
if (_primitiveType == PrimitiveType.Quads && !HwCapabilities.SupportsQuads)
{
@@ -396,7 +396,7 @@ namespace Ryujinx.Graphics.OpenGL
private void DrawQuadsIndexedImpl(
int indexCount,
int instanceCount,
- IntPtr indexBaseOffset,
+ nint indexBaseOffset,
int indexElemSize,
int firstVertex,
int firstInstance)
@@ -447,7 +447,7 @@ namespace Ryujinx.Graphics.OpenGL
}
else
{
- IntPtr[] indices = new IntPtr[quadsCount];
+ nint[] indices = new nint[quadsCount];
int[] counts = new int[quadsCount];
@@ -475,7 +475,7 @@ namespace Ryujinx.Graphics.OpenGL
private void DrawQuadStripIndexedImpl(
int indexCount,
int instanceCount,
- IntPtr indexBaseOffset,
+ nint indexBaseOffset,
int indexElemSize,
int firstVertex,
int firstInstance)
@@ -483,7 +483,7 @@ namespace Ryujinx.Graphics.OpenGL
// TODO: Instanced rendering.
int quadsCount = (indexCount - 2) / 2;
- IntPtr[] indices = new IntPtr[quadsCount];
+ nint[] indices = new nint[quadsCount];
int[] counts = new int[quadsCount];
@@ -516,7 +516,7 @@ namespace Ryujinx.Graphics.OpenGL
private void DrawIndexedImpl(
int indexCount,
int instanceCount,
- IntPtr indexBaseOffset,
+ nint indexBaseOffset,
int firstVertex,
int firstInstance)
{
@@ -589,7 +589,7 @@ namespace Ryujinx.Graphics.OpenGL
GL.BindBuffer((BufferTarget)All.DrawIndirectBuffer, indirectBuffer.Handle.ToInt32());
- GL.DrawElementsIndirect(_primitiveType, _elementsType, (IntPtr)indirectBuffer.Offset);
+ GL.DrawElementsIndirect(_primitiveType, _elementsType, (nint)indirectBuffer.Offset);
_vertexArray.RestoreIndexBuffer();
@@ -614,8 +614,8 @@ namespace Ryujinx.Graphics.OpenGL
GL.MultiDrawElementsIndirectCount(
_primitiveType,
(All)_elementsType,
- (IntPtr)indirectBuffer.Offset,
- (IntPtr)parameterBuffer.Offset,
+ (nint)indirectBuffer.Offset,
+ (nint)parameterBuffer.Offset,
maxDrawCount,
stride);
@@ -636,7 +636,7 @@ namespace Ryujinx.Graphics.OpenGL
GL.BindBuffer((BufferTarget)All.DrawIndirectBuffer, indirectBuffer.Handle.ToInt32());
- GL.DrawArraysIndirect(_primitiveType, (IntPtr)indirectBuffer.Offset);
+ GL.DrawArraysIndirect(_primitiveType, (nint)indirectBuffer.Offset);
PostDraw();
}
@@ -656,8 +656,8 @@ namespace Ryujinx.Graphics.OpenGL
GL.MultiDrawArraysIndirectCount(
_primitiveType,
- (IntPtr)indirectBuffer.Offset,
- (IntPtr)parameterBuffer.Offset,
+ (nint)indirectBuffer.Offset,
+ (nint)parameterBuffer.Offset,
maxDrawCount,
stride);
@@ -972,7 +972,7 @@ namespace Ryujinx.Graphics.OpenGL
{
_elementsType = type.Convert();
- _indexBaseOffset = (IntPtr)buffer.Offset;
+ _indexBaseOffset = (nint)buffer.Offset;
EnsureVertexArray();
@@ -1450,11 +1450,11 @@ namespace Ryujinx.Graphics.OpenGL
if (buffer.Handle == BufferHandle.Null)
{
- GL.BindBufferRange(target, assignment.Binding, 0, IntPtr.Zero, 0);
+ GL.BindBufferRange(target, assignment.Binding, 0, nint.Zero, 0);
continue;
}
- GL.BindBufferRange(target, assignment.Binding, buffer.Handle.ToInt32(), (IntPtr)buffer.Offset, buffer.Size);
+ GL.BindBufferRange(target, assignment.Binding, buffer.Handle.ToInt32(), (nint)buffer.Offset, buffer.Size);
}
}
diff --git a/src/Ryujinx.Graphics.OpenGL/Program.cs b/src/Ryujinx.Graphics.OpenGL/Program.cs
index 19de06f8f..608a03451 100644
--- a/src/Ryujinx.Graphics.OpenGL/Program.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Program.cs
@@ -86,7 +86,7 @@ namespace Ryujinx.Graphics.OpenGL
{
fixed (byte* ptr = code)
{
- GL.ProgramBinary(Handle, binaryFormat, (IntPtr)ptr, code.Length - 4);
+ GL.ProgramBinary(Handle, binaryFormat, (nint)ptr, code.Length - 4);
}
}
}
diff --git a/src/Ryujinx.Graphics.OpenGL/Queries/BufferedQuery.cs b/src/Ryujinx.Graphics.OpenGL/Queries/BufferedQuery.cs
index 0a85970d7..a5acd8dce 100644
--- a/src/Ryujinx.Graphics.OpenGL/Queries/BufferedQuery.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Queries/BufferedQuery.cs
@@ -15,7 +15,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
public int Query { get; }
private readonly int _buffer;
- private readonly IntPtr _bufferMap;
+ private readonly nint _bufferMap;
private readonly QueryTarget _type;
public BufferedQuery(QueryTarget type)
@@ -29,9 +29,9 @@ namespace Ryujinx.Graphics.OpenGL.Queries
unsafe
{
long defaultValue = DefaultValue;
- GL.BufferStorage(BufferTarget.QueryBuffer, sizeof(long), (IntPtr)(&defaultValue), BufferStorageFlags.MapReadBit | BufferStorageFlags.MapWriteBit | BufferStorageFlags.MapPersistentBit);
+ GL.BufferStorage(BufferTarget.QueryBuffer, sizeof(long), (nint)(&defaultValue), BufferStorageFlags.MapReadBit | BufferStorageFlags.MapWriteBit | BufferStorageFlags.MapPersistentBit);
}
- _bufferMap = GL.MapBufferRange(BufferTarget.QueryBuffer, IntPtr.Zero, sizeof(long), BufferAccessMask.MapReadBit | BufferAccessMask.MapWriteBit | BufferAccessMask.MapPersistentBit);
+ _bufferMap = GL.MapBufferRange(BufferTarget.QueryBuffer, nint.Zero, sizeof(long), BufferAccessMask.MapReadBit | BufferAccessMask.MapWriteBit | BufferAccessMask.MapPersistentBit);
}
public void Reset()
diff --git a/src/Ryujinx.Graphics.OpenGL/Sync.cs b/src/Ryujinx.Graphics.OpenGL/Sync.cs
index eba1638a3..e8f7ebc00 100644
--- a/src/Ryujinx.Graphics.OpenGL/Sync.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Sync.cs
@@ -11,7 +11,7 @@ namespace Ryujinx.Graphics.OpenGL
private class SyncHandle
{
public ulong ID;
- public IntPtr Handle;
+ public nint Handle;
}
private ulong _firstHandle = 0;
@@ -50,7 +50,7 @@ namespace Ryujinx.Graphics.OpenGL
{
lock (handle)
{
- if (handle.Handle == IntPtr.Zero)
+ if (handle.Handle == nint.Zero)
{
continue;
}
@@ -96,7 +96,7 @@ namespace Ryujinx.Graphics.OpenGL
{
lock (result)
{
- if (result.Handle == IntPtr.Zero)
+ if (result.Handle == nint.Zero)
{
return;
}
@@ -140,7 +140,7 @@ namespace Ryujinx.Graphics.OpenGL
_firstHandle = first.ID + 1;
_handles.RemoveAt(0);
GL.DeleteSync(first.Handle);
- first.Handle = IntPtr.Zero;
+ first.Handle = nint.Zero;
}
}
}
@@ -161,7 +161,7 @@ namespace Ryujinx.Graphics.OpenGL
lock (handle)
{
GL.DeleteSync(handle.Handle);
- handle.Handle = IntPtr.Zero;
+ handle.Handle = nint.Zero;
}
}
diff --git a/src/Ryujinx.Graphics.OpenGL/VertexArray.cs b/src/Ryujinx.Graphics.OpenGL/VertexArray.cs
index 32211e783..2db84421f 100644
--- a/src/Ryujinx.Graphics.OpenGL/VertexArray.cs
+++ b/src/Ryujinx.Graphics.OpenGL/VertexArray.cs
@@ -56,7 +56,7 @@ namespace Ryujinx.Graphics.OpenGL
minVertexCount = vertexCount;
}
- GL.BindVertexBuffer(bindingIndex, vb.Buffer.Handle.ToInt32(), (IntPtr)vb.Buffer.Offset, vb.Stride);
+ GL.BindVertexBuffer(bindingIndex, vb.Buffer.Handle.ToInt32(), (nint)vb.Buffer.Offset, vb.Stride);
GL.VertexBindingDivisor(bindingIndex, vb.Divisor);
_vertexBuffersInUse |= 1u << bindingIndex;
}
@@ -64,7 +64,7 @@ namespace Ryujinx.Graphics.OpenGL
{
if ((_vertexBuffersInUse & (1u << bindingIndex)) != 0)
{
- GL.BindVertexBuffer(bindingIndex, 0, IntPtr.Zero, 0);
+ GL.BindVertexBuffer(bindingIndex, 0, nint.Zero, 0);
_vertexBuffersInUse &= ~(1u << bindingIndex);
}
}
@@ -188,7 +188,7 @@ namespace Ryujinx.Graphics.OpenGL
Buffer.Copy(vb.Buffer.Handle, tempVertexBuffer, vb.Buffer.Offset, currentTempVbOffset, vb.Buffer.Size);
Buffer.Clear(tempVertexBuffer, currentTempVbOffset + vb.Buffer.Size, requiredSize - vb.Buffer.Size, 0);
- GL.BindVertexBuffer(vbIndex, tempVertexBuffer.ToInt32(), (IntPtr)currentTempVbOffset, vb.Stride);
+ GL.BindVertexBuffer(vbIndex, tempVertexBuffer.ToInt32(), (nint)currentTempVbOffset, vb.Stride);
currentTempVbOffset += requiredSize;
_vertexBuffersLimited |= 1u << vbIndex;
@@ -234,7 +234,7 @@ namespace Ryujinx.Graphics.OpenGL
ref var vb = ref _vertexBuffers[vbIndex];
- GL.BindVertexBuffer(vbIndex, vb.Buffer.Handle.ToInt32(), (IntPtr)vb.Buffer.Offset, vb.Stride);
+ GL.BindVertexBuffer(vbIndex, vb.Buffer.Handle.ToInt32(), (nint)vb.Buffer.Offset, vb.Stride);
buffersLimited &= ~(1u << vbIndex);
}
diff --git a/src/Ryujinx.Graphics.Video/Plane.cs b/src/Ryujinx.Graphics.Video/Plane.cs
index b895cad90..4e4e65b32 100644
--- a/src/Ryujinx.Graphics.Video/Plane.cs
+++ b/src/Ryujinx.Graphics.Video/Plane.cs
@@ -2,5 +2,5 @@ using System;
namespace Ryujinx.Graphics.Video
{
- public readonly record struct Plane(IntPtr Pointer, int Length);
+ public readonly record struct Plane(nint Pointer, int Length);
}
diff --git a/src/Ryujinx.Graphics.Vulkan/BufferHolder.cs b/src/Ryujinx.Graphics.Vulkan/BufferHolder.cs
index e840fdc02..6dce6abb5 100644
--- a/src/Ryujinx.Graphics.Vulkan/BufferHolder.cs
+++ b/src/Ryujinx.Graphics.Vulkan/BufferHolder.cs
@@ -40,7 +40,7 @@ namespace Ryujinx.Graphics.Vulkan
public int Size { get; }
- private readonly IntPtr _map;
+ private readonly nint _map;
private readonly MultiFenceHolder _waitable;
@@ -370,7 +370,7 @@ namespace Ryujinx.Graphics.Vulkan
return Unsafe.As(ref handle);
}
- public IntPtr Map(int offset, int mappingSize)
+ public nint Map(int offset, int mappingSize)
{
return _map;
}
@@ -435,7 +435,7 @@ namespace Ryujinx.Graphics.Vulkan
Span result;
- if (_map != IntPtr.Zero)
+ if (_map != nint.Zero)
{
result = GetDataStorage(offset, size);
@@ -470,7 +470,7 @@ namespace Ryujinx.Graphics.Vulkan
{
int mappingSize = Math.Min(size, Size - offset);
- if (_map != IntPtr.Zero)
+ if (_map != nint.Zero)
{
return new Span((void*)(_map + offset), mappingSize);
}
@@ -515,7 +515,7 @@ namespace Ryujinx.Graphics.Vulkan
bool allowMirror = _useMirrors && allowCbsWait && cbs != null && _activeType <= BufferAllocationType.HostMapped;
- if (_map != IntPtr.Zero)
+ if (_map != nint.Zero)
{
// If persistently mapped, set the data directly if the buffer is not currently in use.
bool isRented = _buffer.HasRentedCommandBufferDependency(_gd.CommandBufferPool);
@@ -630,7 +630,7 @@ namespace Ryujinx.Graphics.Vulkan
return;
}
- if (_map != IntPtr.Zero)
+ if (_map != nint.Zero)
{
data[..dataSize].CopyTo(new Span((void*)(_map + offset), dataSize));
}
diff --git a/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs b/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs
index ff1565246..77c5f95c9 100644
--- a/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs
+++ b/src/Ryujinx.Graphics.Vulkan/HostMemoryAllocator.cs
@@ -13,13 +13,13 @@ namespace Ryujinx.Graphics.Vulkan
private readonly struct HostMemoryAllocation
{
public readonly Auto Allocation;
- public readonly IntPtr Pointer;
+ public readonly nint Pointer;
public readonly ulong Size;
public ulong Start => (ulong)Pointer;
public ulong End => (ulong)Pointer + Size;
- public HostMemoryAllocation(Auto allocation, IntPtr pointer, ulong size)
+ public HostMemoryAllocation(Auto allocation, nint pointer, ulong size)
{
Allocation = allocation;
Pointer = pointer;
@@ -50,7 +50,7 @@ namespace Ryujinx.Graphics.Vulkan
public unsafe bool TryImport(
MemoryRequirements requirements,
MemoryPropertyFlags flags,
- IntPtr pointer,
+ nint pointer,
ulong size)
{
lock (_lock)
@@ -139,7 +139,7 @@ namespace Ryujinx.Graphics.Vulkan
return true;
}
- public (Auto, ulong) GetExistingAllocation(IntPtr pointer, ulong size)
+ public (Auto, ulong) GetExistingAllocation(nint pointer, ulong size)
{
lock (_lock)
{
diff --git a/src/Ryujinx.Graphics.Vulkan/MemoryAllocation.cs b/src/Ryujinx.Graphics.Vulkan/MemoryAllocation.cs
index 3f134e289..d0d0ac1e7 100644
--- a/src/Ryujinx.Graphics.Vulkan/MemoryAllocation.cs
+++ b/src/Ryujinx.Graphics.Vulkan/MemoryAllocation.cs
@@ -10,7 +10,7 @@ namespace Ryujinx.Graphics.Vulkan
private readonly HostMemoryAllocator _hostMemory;
public DeviceMemory Memory { get; }
- public IntPtr HostPointer { get; }
+ public nint HostPointer { get; }
public ulong Offset { get; }
public ulong Size { get; }
@@ -18,7 +18,7 @@ namespace Ryujinx.Graphics.Vulkan
MemoryAllocatorBlockList owner,
MemoryAllocatorBlockList.Block block,
DeviceMemory memory,
- IntPtr hostPointer,
+ nint hostPointer,
ulong offset,
ulong size)
{
@@ -33,7 +33,7 @@ namespace Ryujinx.Graphics.Vulkan
public MemoryAllocation(
HostMemoryAllocator hostMemory,
DeviceMemory memory,
- IntPtr hostPointer,
+ nint hostPointer,
ulong offset,
ulong size)
{
diff --git a/src/Ryujinx.Graphics.Vulkan/MemoryAllocatorBlockList.cs b/src/Ryujinx.Graphics.Vulkan/MemoryAllocatorBlockList.cs
index 3d42ed7e2..4a0cb2a74 100644
--- a/src/Ryujinx.Graphics.Vulkan/MemoryAllocatorBlockList.cs
+++ b/src/Ryujinx.Graphics.Vulkan/MemoryAllocatorBlockList.cs
@@ -14,9 +14,9 @@ namespace Ryujinx.Graphics.Vulkan
public class Block : IComparable
{
public DeviceMemory Memory { get; private set; }
- public IntPtr HostPointer { get; private set; }
+ public nint HostPointer { get; private set; }
public ulong Size { get; }
- public bool Mapped => HostPointer != IntPtr.Zero;
+ public bool Mapped => HostPointer != nint.Zero;
private readonly struct Range : IComparable
{
@@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.Vulkan
private readonly List _freeRanges;
- public Block(DeviceMemory memory, IntPtr hostPointer, ulong size)
+ public Block(DeviceMemory memory, nint hostPointer, ulong size)
{
Memory = memory;
HostPointer = hostPointer;
@@ -146,7 +146,7 @@ namespace Ryujinx.Graphics.Vulkan
if (Mapped)
{
api.UnmapMemory(device, Memory);
- HostPointer = IntPtr.Zero;
+ HostPointer = nint.Zero;
}
if (Memory.Handle != 0)
@@ -222,13 +222,13 @@ namespace Ryujinx.Graphics.Vulkan
_api.AllocateMemory(_device, in memoryAllocateInfo, null, out var deviceMemory).ThrowOnError();
- IntPtr hostPointer = IntPtr.Zero;
+ nint hostPointer = nint.Zero;
if (map)
{
void* pointer = null;
_api.MapMemory(_device, deviceMemory, 0, blockAlignedSize, 0, ref pointer).ThrowOnError();
- hostPointer = (IntPtr)pointer;
+ hostPointer = (nint)pointer;
}
var newBlock = new Block(deviceMemory, hostPointer, blockAlignedSize);
@@ -241,14 +241,14 @@ namespace Ryujinx.Graphics.Vulkan
return new MemoryAllocation(this, newBlock, deviceMemory, GetHostPointer(newBlock, newBlockOffset), newBlockOffset, size);
}
- private static IntPtr GetHostPointer(Block block, ulong offset)
+ private static nint GetHostPointer(Block block, ulong offset)
{
- if (block.HostPointer == IntPtr.Zero)
+ if (block.HostPointer == nint.Zero)
{
- return IntPtr.Zero;
+ return nint.Zero;
}
- return (IntPtr)((nuint)block.HostPointer + offset);
+ return (nint)((nuint)block.HostPointer + offset);
}
public void Free(Block block, ulong offset, ulong size)
diff --git a/src/Ryujinx.Graphics.Vulkan/MoltenVK/MVKConfiguration.cs b/src/Ryujinx.Graphics.Vulkan/MoltenVK/MVKConfiguration.cs
index bdf606e82..271999375 100644
--- a/src/Ryujinx.Graphics.Vulkan/MoltenVK/MVKConfiguration.cs
+++ b/src/Ryujinx.Graphics.Vulkan/MoltenVK/MVKConfiguration.cs
@@ -90,7 +90,7 @@ namespace Ryujinx.Graphics.Vulkan.MoltenVK
public Bool32 SemaphoreUseMTLFence;
public MVKVkSemaphoreSupportStyle SemaphoreSupportStyle;
public MVKConfigAutoGPUCaptureScope AutoGPUCaptureScope;
- public IntPtr AutoGPUCaptureOutputFilepath;
+ public nint AutoGPUCaptureOutputFilepath;
public Bool32 Texture1DAs2D;
public Bool32 PreallocateDescriptors;
public Bool32 UseCommandPooling;
diff --git a/src/Ryujinx.Graphics.Vulkan/MoltenVK/MVKInitialization.cs b/src/Ryujinx.Graphics.Vulkan/MoltenVK/MVKInitialization.cs
index 930d6b525..086c4e1df 100644
--- a/src/Ryujinx.Graphics.Vulkan/MoltenVK/MVKInitialization.cs
+++ b/src/Ryujinx.Graphics.Vulkan/MoltenVK/MVKInitialization.cs
@@ -12,16 +12,16 @@ namespace Ryujinx.Graphics.Vulkan.MoltenVK
private const string VulkanLib = "libvulkan.dylib";
[LibraryImport("libMoltenVK.dylib")]
- private static partial Result vkGetMoltenVKConfigurationMVK(IntPtr unusedInstance, out MVKConfiguration config, in IntPtr configSize);
+ private static partial Result vkGetMoltenVKConfigurationMVK(nint unusedInstance, out MVKConfiguration config, in nint configSize);
[LibraryImport("libMoltenVK.dylib")]
- private static partial Result vkSetMoltenVKConfigurationMVK(IntPtr unusedInstance, in MVKConfiguration config, in IntPtr configSize);
+ private static partial Result vkSetMoltenVKConfigurationMVK(nint unusedInstance, in MVKConfiguration config, in nint configSize);
public static void Initialize()
{
- var configSize = (IntPtr)Marshal.SizeOf();
+ var configSize = (nint)Marshal.SizeOf();
- vkGetMoltenVKConfigurationMVK(IntPtr.Zero, out MVKConfiguration config, configSize);
+ vkGetMoltenVKConfigurationMVK(nint.Zero, out MVKConfiguration config, configSize);
config.UseMetalArgumentBuffers = true;
@@ -30,7 +30,7 @@ namespace Ryujinx.Graphics.Vulkan.MoltenVK
config.ResumeLostDevice = true;
- vkSetMoltenVKConfigurationMVK(IntPtr.Zero, config, configSize);
+ vkSetMoltenVKConfigurationMVK(nint.Zero, config, configSize);
}
private static string[] Resolver(string path)
diff --git a/src/Ryujinx.Graphics.Vulkan/NativeArray.cs b/src/Ryujinx.Graphics.Vulkan/NativeArray.cs
index 7678b63c8..33377962b 100644
--- a/src/Ryujinx.Graphics.Vulkan/NativeArray.cs
+++ b/src/Ryujinx.Graphics.Vulkan/NativeArray.cs
@@ -40,7 +40,7 @@ namespace Ryujinx.Graphics.Vulkan
{
if (Pointer != null)
{
- Marshal.FreeHGlobal((IntPtr)Pointer);
+ Marshal.FreeHGlobal((nint)Pointer);
Pointer = null;
}
}
diff --git a/src/Ryujinx.Graphics.Vulkan/Queries/BufferedQuery.cs b/src/Ryujinx.Graphics.Vulkan/Queries/BufferedQuery.cs
index c9a546648..5d48a6622 100644
--- a/src/Ryujinx.Graphics.Vulkan/Queries/BufferedQuery.cs
+++ b/src/Ryujinx.Graphics.Vulkan/Queries/BufferedQuery.cs
@@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
private QueryPool _queryPool;
private readonly BufferHolder _buffer;
- private readonly IntPtr _bufferMap;
+ private readonly nint _bufferMap;
private readonly CounterType _type;
private readonly bool _result32Bit;
private readonly bool _isSupported;
diff --git a/src/Ryujinx.Graphics.Vulkan/Shader.cs b/src/Ryujinx.Graphics.Vulkan/Shader.cs
index 1c8caffd9..f23b78f51 100644
--- a/src/Ryujinx.Graphics.Vulkan/Shader.cs
+++ b/src/Ryujinx.Graphics.Vulkan/Shader.cs
@@ -15,7 +15,7 @@ namespace Ryujinx.Graphics.Vulkan
// Take this lock when using them.
private static readonly object _shaderOptionsLock = new();
- private static readonly IntPtr _ptrMainEntryPointName = Marshal.StringToHGlobalAnsi("main");
+ private static readonly nint _ptrMainEntryPointName = Marshal.StringToHGlobalAnsi("main");
private readonly Vk _api;
private readonly Device _device;
diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanDebugMessenger.cs b/src/Ryujinx.Graphics.Vulkan/VulkanDebugMessenger.cs
index 496a90fbe..6dfcd8b6e 100644
--- a/src/Ryujinx.Graphics.Vulkan/VulkanDebugMessenger.cs
+++ b/src/Ryujinx.Graphics.Vulkan/VulkanDebugMessenger.cs
@@ -95,7 +95,7 @@ namespace Ryujinx.Graphics.Vulkan
DebugUtilsMessengerCallbackDataEXT* pCallbackData,
void* pUserData)
{
- var msg = Marshal.PtrToStringAnsi((IntPtr)pCallbackData->PMessage);
+ var msg = Marshal.PtrToStringAnsi((nint)pCallbackData->PMessage);
if (messageSeverity.HasFlag(DebugUtilsMessageSeverityFlagsEXT.ErrorBitExt))
{
diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs b/src/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs
index 2c327fdb7..352f271cc 100644
--- a/src/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs
+++ b/src/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs
@@ -94,8 +94,8 @@ namespace Ryujinx.Graphics.Vulkan
ApiVersion = _maximumVulkanVersion,
};
- IntPtr* ppEnabledExtensions = stackalloc IntPtr[enabledExtensions.Length];
- IntPtr* ppEnabledLayers = stackalloc IntPtr[enabledLayers.Count];
+ nint* ppEnabledExtensions = stackalloc nint[enabledExtensions.Length];
+ nint* ppEnabledLayers = stackalloc nint[enabledLayers.Count];
for (int i = 0; i < enabledExtensions.Length; i++)
{
@@ -587,7 +587,7 @@ namespace Ryujinx.Graphics.Vulkan
var enabledExtensions = _requiredExtensions.Union(_desirableExtensions.Intersect(physicalDevice.DeviceExtensions)).ToArray();
- IntPtr* ppEnabledExtensions = stackalloc IntPtr[enabledExtensions.Length];
+ nint* ppEnabledExtensions = stackalloc nint[enabledExtensions.Length];
for (int i = 0; i < enabledExtensions.Length; i++)
{
diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanInstance.cs b/src/Ryujinx.Graphics.Vulkan/VulkanInstance.cs
index 843d34125..69b75925e 100644
--- a/src/Ryujinx.Graphics.Vulkan/VulkanInstance.cs
+++ b/src/Ryujinx.Graphics.Vulkan/VulkanInstance.cs
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Vulkan
_api = api;
Instance = instance;
- if (api.GetInstanceProcAddr(instance, "vkEnumerateInstanceVersion") == IntPtr.Zero)
+ if (api.GetInstanceProcAddr(instance, "vkEnumerateInstanceVersion") == nint.Zero)
{
InstanceVersion = Vk.Version10;
}
@@ -94,7 +94,7 @@ namespace Ryujinx.Graphics.Vulkan
unsafe
{
- return extensionProperties.Select(x => Marshal.PtrToStringAnsi((IntPtr)x.ExtensionName)).ToImmutableHashSet();
+ return extensionProperties.Select(x => Marshal.PtrToStringAnsi((nint)x.ExtensionName)).ToImmutableHashSet();
}
}
@@ -110,7 +110,7 @@ namespace Ryujinx.Graphics.Vulkan
unsafe
{
- return layerProperties.Select(x => Marshal.PtrToStringAnsi((IntPtr)x.LayerName)).ToImmutableHashSet();
+ return layerProperties.Select(x => Marshal.PtrToStringAnsi((nint)x.LayerName)).ToImmutableHashSet();
}
}
diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanPhysicalDevice.cs b/src/Ryujinx.Graphics.Vulkan/VulkanPhysicalDevice.cs
index 3bee1e9d8..b3f8fd756 100644
--- a/src/Ryujinx.Graphics.Vulkan/VulkanPhysicalDevice.cs
+++ b/src/Ryujinx.Graphics.Vulkan/VulkanPhysicalDevice.cs
@@ -31,7 +31,7 @@ namespace Ryujinx.Graphics.Vulkan
unsafe
{
- DeviceName = Marshal.PtrToStringAnsi((IntPtr)physicalDeviceProperties.DeviceName);
+ DeviceName = Marshal.PtrToStringAnsi((nint)physicalDeviceProperties.DeviceName);
}
uint propertiesCount = 0;
@@ -50,7 +50,7 @@ namespace Ryujinx.Graphics.Vulkan
unsafe
{
- DeviceExtensions = extensionProperties.Select(x => Marshal.PtrToStringAnsi((IntPtr)x.ExtensionName)).ToImmutableHashSet();
+ DeviceExtensions = extensionProperties.Select(x => Marshal.PtrToStringAnsi((nint)x.ExtensionName)).ToImmutableHashSet();
}
}
diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
index 0faaec82a..af2cfa17f 100644
--- a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
+++ b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
@@ -27,6 +27,8 @@ namespace Ryujinx.Graphics.Vulkan
private bool _initialized;
+ public uint ProgramCount { get; set; } = 0;
+
internal FormatCapabilities FormatCapabilities { get; private set; }
internal HardwareCapabilities Capabilities;
@@ -363,7 +365,7 @@ namespace Ryujinx.Graphics.Vulkan
fixed (byte* deviceName = properties.DeviceName)
{
- GpuRenderer = Marshal.PtrToStringAnsi((IntPtr)deviceName);
+ GpuRenderer = Marshal.PtrToStringAnsi((nint)deviceName);
}
GpuVersion = $"Vulkan v{ParseStandardVulkanVersion(properties.ApiVersion)}, Driver v{ParseDriverVersion(ref properties)}";
@@ -544,6 +546,8 @@ namespace Ryujinx.Graphics.Vulkan
public IProgram CreateProgram(ShaderSource[] sources, ShaderInfo info)
{
+ ProgramCount++;
+
bool isCompute = sources.Length == 1 && sources[0].Stage == ShaderStage.Compute;
if (info.State.HasValue || isCompute)
diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/ISocket.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/ISocket.cs
index fe2f8477f..cf32daf3b 100644
--- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/ISocket.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/ISocket.cs
@@ -16,7 +16,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
ProtocolType ProtocolType { get; }
- IntPtr Handle { get; }
+ nint Handle { get; }
LinuxError Receive(out int receiveSize, Span buffer, BsdSocketFlags flags);
diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs
index c42b7201b..c9b811cf5 100644
--- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs
@@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
public bool Blocking { get => Socket.Blocking; set => Socket.Blocking = value; }
- public IntPtr Handle => Socket.Handle;
+ public nint Handle => Socket.Handle;
public IPEndPoint RemoteEndPoint => Socket.RemoteEndPoint as IPEndPoint;
diff --git a/src/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs b/src/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs
index 1804d045c..10561a5a1 100644
--- a/src/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs
+++ b/src/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs
@@ -85,7 +85,9 @@ namespace Ryujinx.HLE.Loaders.Processes
}
// TODO: LibHac npdm currently doesn't support version field.
- string version = ProgramId > 0x0100000000007FFF ? DisplayVersion : device.System.ContentManager.GetCurrentFirmwareVersion()?.VersionString ?? "?";
+ string version = ProgramId > 0x0100000000007FFF
+ ? DisplayVersion
+ : device.System.ContentManager.GetCurrentFirmwareVersion()?.VersionString ?? "?";
Logger.Info?.Print(LogClass.Loader, $"Application Loaded: {Name} v{version} [{ProgramIdText}] [{(Is64Bit ? "64-bit" : "32-bit")}]");
diff --git a/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs b/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs
index 7ea6e1481..ce52f84d9 100644
--- a/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs
+++ b/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs
@@ -40,7 +40,7 @@ namespace Ryujinx.Headless.SDL2.OpenGL
private class OpenToolkitBindingsContext : IBindingsContext
{
- public IntPtr GetProcAddress(string procName)
+ public nint GetProcAddress(string procName)
{
return SDL_GL_GetProcAddress(procName);
}
@@ -48,11 +48,11 @@ namespace Ryujinx.Headless.SDL2.OpenGL
private class SDL2OpenGLContext : IOpenGLContext
{
- private readonly IntPtr _context;
- private readonly IntPtr _window;
+ private readonly nint _context;
+ private readonly nint _window;
private readonly bool _shouldDisposeWindow;
- public SDL2OpenGLContext(IntPtr context, IntPtr window, bool shouldDisposeWindow = true)
+ public SDL2OpenGLContext(nint context, nint window, bool shouldDisposeWindow = true)
{
_context = context;
_window = window;
@@ -65,14 +65,14 @@ namespace Ryujinx.Headless.SDL2.OpenGL
// Ensure we share our contexts.
SetupOpenGLAttributes(true, GraphicsDebugLevel.None);
- IntPtr windowHandle = SDL_CreateWindow("Ryujinx background context window", 0, 0, 1, 1, SDL_WindowFlags.SDL_WINDOW_OPENGL | SDL_WindowFlags.SDL_WINDOW_HIDDEN);
- IntPtr context = SDL_GL_CreateContext(windowHandle);
+ nint windowHandle = SDL_CreateWindow("Ryujinx background context window", 0, 0, 1, 1, SDL_WindowFlags.SDL_WINDOW_OPENGL | SDL_WindowFlags.SDL_WINDOW_HIDDEN);
+ nint context = SDL_GL_CreateContext(windowHandle);
GL.LoadBindings(new OpenToolkitBindingsContext());
CheckResult(SDL_GL_SetAttribute(SDL_GLattr.SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 0));
- CheckResult(SDL_GL_MakeCurrent(windowHandle, IntPtr.Zero));
+ CheckResult(SDL_GL_MakeCurrent(windowHandle, nint.Zero));
return new SDL2OpenGLContext(context, windowHandle);
}
@@ -96,7 +96,7 @@ namespace Ryujinx.Headless.SDL2.OpenGL
}
}
- public bool HasContext() => SDL_GL_GetCurrentContext() != IntPtr.Zero;
+ public bool HasContext() => SDL_GL_GetCurrentContext() != nint.Zero;
public void Dispose()
{
@@ -129,10 +129,10 @@ namespace Ryujinx.Headless.SDL2.OpenGL
{
// Ensure to not share this context with other contexts before this point.
SetupOpenGLAttributes(false, _glLogLevel);
- IntPtr context = SDL_GL_CreateContext(WindowHandle);
+ nint context = SDL_GL_CreateContext(WindowHandle);
CheckResult(SDL_GL_SetSwapInterval(1));
- if (context == IntPtr.Zero)
+ if (context == nint.Zero)
{
string errorMessage = $"SDL_GL_CreateContext failed with error \"{SDL_GetError()}\"";
@@ -190,7 +190,7 @@ namespace Ryujinx.Headless.SDL2.OpenGL
Device.DisposeGpu();
// Unbind context and destroy everything
- CheckResult(SDL_GL_MakeCurrent(WindowHandle, IntPtr.Zero));
+ CheckResult(SDL_GL_MakeCurrent(WindowHandle, nint.Zero));
_openGLContext.Dispose();
}
diff --git a/src/Ryujinx.Headless.SDL2/Program.cs b/src/Ryujinx.Headless.SDL2/Program.cs
index b8710d4de..b6ccb2ac4 100644
--- a/src/Ryujinx.Headless.SDL2/Program.cs
+++ b/src/Ryujinx.Headless.SDL2/Program.cs
@@ -119,12 +119,10 @@ namespace Ryujinx.Headless.SDL2
}
}
- IGamepad gamepad;
+ IGamepad gamepad = _inputManager.KeyboardDriver.GetGamepad(inputId);
bool isKeyboard = true;
- gamepad = _inputManager.KeyboardDriver.GetGamepad(inputId);
-
if (gamepad == null)
{
gamepad = _inputManager.GamepadDriver.GetGamepad(inputId);
diff --git a/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs b/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs
index e5572c936..fb73ca335 100644
--- a/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs
+++ b/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs
@@ -46,7 +46,7 @@ namespace Ryujinx.Headless.SDL2.Vulkan
action();
}
- public IntPtr CreateWindowSurface(IntPtr instance)
+ public nint CreateWindowSurface(nint instance)
{
ulong surfaceHandle = 0;
@@ -71,19 +71,19 @@ namespace Ryujinx.Headless.SDL2.Vulkan
CreateSurface();
}
- return (IntPtr)surfaceHandle;
+ return (nint)surfaceHandle;
}
public unsafe string[] GetRequiredInstanceExtensions()
{
- if (SDL_Vulkan_GetInstanceExtensions(WindowHandle, out uint extensionsCount, IntPtr.Zero) == SDL_bool.SDL_TRUE)
+ if (SDL_Vulkan_GetInstanceExtensions(WindowHandle, out uint extensionsCount, nint.Zero) == SDL_bool.SDL_TRUE)
{
- IntPtr[] rawExtensions = new IntPtr[(int)extensionsCount];
+ nint[] rawExtensions = new nint[(int)extensionsCount];
string[] extensions = new string[(int)extensionsCount];
- fixed (IntPtr* rawExtensionsPtr = rawExtensions)
+ fixed (nint* rawExtensionsPtr = rawExtensions)
{
- if (SDL_Vulkan_GetInstanceExtensions(WindowHandle, out extensionsCount, (IntPtr)rawExtensionsPtr) == SDL_bool.SDL_TRUE)
+ if (SDL_Vulkan_GetInstanceExtensions(WindowHandle, out extensionsCount, (nint)rawExtensionsPtr) == SDL_bool.SDL_TRUE)
{
for (int i = 0; i < extensions.Length; i++)
{
diff --git a/src/Ryujinx.Headless.SDL2/WindowBase.cs b/src/Ryujinx.Headless.SDL2/WindowBase.cs
index 039ef10e8..4addf62b5 100644
--- a/src/Ryujinx.Headless.SDL2/WindowBase.cs
+++ b/src/Ryujinx.Headless.SDL2/WindowBase.cs
@@ -38,7 +38,7 @@ namespace Ryujinx.Headless.SDL2
[LibraryImport("SDL2")]
// TODO: Remove this as soon as SDL2-CS was updated to expose this method publicly
- private static partial IntPtr SDL_LoadBMP_RW(IntPtr src, int freesrc);
+ private static partial nint SDL_LoadBMP_RW(nint src, int freesrc);
public static void QueueMainThreadAction(Action action)
{
@@ -52,7 +52,7 @@ namespace Ryujinx.Headless.SDL2
public event EventHandler StatusUpdatedEvent;
- protected IntPtr WindowHandle { get; set; }
+ protected nint WindowHandle { get; set; }
public IHostUITheme HostUITheme { get; }
public int Width { get; private set; }
@@ -148,8 +148,8 @@ namespace Ryujinx.Headless.SDL2
{
fixed (byte* iconPtr = iconBytes)
{
- IntPtr rwOpsStruct = SDL_RWFromConstMem((IntPtr)iconPtr, iconBytes.Length);
- IntPtr iconHandle = SDL_LoadBMP_RW(rwOpsStruct, 1);
+ nint rwOpsStruct = SDL_RWFromConstMem((nint)iconPtr, iconBytes.Length);
+ nint iconHandle = SDL_LoadBMP_RW(rwOpsStruct, 1);
SDL_SetWindowIcon(WindowHandle, iconHandle);
SDL_FreeSurface(iconHandle);
@@ -187,7 +187,7 @@ namespace Ryujinx.Headless.SDL2
WindowHandle = SDL_CreateWindow($"Ryujinx {Program.Version}{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}", SDL_WINDOWPOS_CENTERED_DISPLAY(DisplayId), SDL_WINDOWPOS_CENTERED_DISPLAY(DisplayId), Width, Height, DefaultFlags | FullscreenFlag | GetWindowFlags());
- if (WindowHandle == IntPtr.Zero)
+ if (WindowHandle == nint.Zero)
{
string errorMessage = $"SDL_CreateWindow failed with error \"{SDL_GetError()}\"";
diff --git a/src/Ryujinx.Input.SDL2/SDL2Gamepad.cs b/src/Ryujinx.Input.SDL2/SDL2Gamepad.cs
index 475855fd5..af6f4c625 100644
--- a/src/Ryujinx.Input.SDL2/SDL2Gamepad.cs
+++ b/src/Ryujinx.Input.SDL2/SDL2Gamepad.cs
@@ -71,11 +71,11 @@ namespace Ryujinx.Input.SDL2
public GamepadFeaturesFlag Features { get; }
- private IntPtr _gamepadHandle;
+ private nint _gamepadHandle;
private float _triggerThreshold;
- public SDL2Gamepad(IntPtr gamepadHandle, string driverId)
+ public SDL2Gamepad(nint gamepadHandle, string driverId)
{
_gamepadHandle = gamepadHandle;
_buttonsUserMapping = new List(20);
@@ -127,11 +127,11 @@ namespace Ryujinx.Input.SDL2
protected virtual void Dispose(bool disposing)
{
- if (disposing && _gamepadHandle != IntPtr.Zero)
+ if (disposing && _gamepadHandle != nint.Zero)
{
SDL_GameControllerClose(_gamepadHandle);
- _gamepadHandle = IntPtr.Zero;
+ _gamepadHandle = nint.Zero;
}
}
@@ -187,7 +187,7 @@ namespace Ryujinx.Input.SDL2
{
float* values = stackalloc float[ElementCount];
- int result = SDL_GameControllerGetSensorData(_gamepadHandle, sensorType, (IntPtr)values, ElementCount);
+ int result = SDL_GameControllerGetSensorData(_gamepadHandle, sensorType, (nint)values, ElementCount);
if (result != 0)
return Vector3.Zero;
diff --git a/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs b/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs
index 012d72d7c..0acbaaa19 100644
--- a/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs
+++ b/src/Ryujinx.Input.SDL2/SDL2GamepadDriver.cs
@@ -115,7 +115,7 @@ namespace Ryujinx.Input.SDL2
{
lock (_lock)
{
- _gamepadsIds.Add(id);
+ _gamepadsIds.Insert(joystickDeviceId, id);
}
OnGamepadConnected?.Invoke(id);
@@ -160,9 +160,9 @@ namespace Ryujinx.Input.SDL2
return null;
}
- IntPtr gamepadHandle = SDL_GameControllerOpen(joystickIndex);
+ nint gamepadHandle = SDL_GameControllerOpen(joystickIndex);
- if (gamepadHandle == IntPtr.Zero)
+ if (gamepadHandle == nint.Zero)
{
return null;
}
diff --git a/src/Ryujinx.Input.SDL2/SDL2Keyboard.cs b/src/Ryujinx.Input.SDL2/SDL2Keyboard.cs
index 08eacc4ee..a0dd8ab95 100644
--- a/src/Ryujinx.Input.SDL2/SDL2Keyboard.cs
+++ b/src/Ryujinx.Input.SDL2/SDL2Keyboard.cs
@@ -225,7 +225,7 @@ namespace Ryujinx.Input.SDL2
unsafe
{
- IntPtr statePtr = SDL_GetKeyboardState(out int numKeys);
+ nint statePtr = SDL_GetKeyboardState(out int numKeys);
rawKeyboardState = new ReadOnlySpan((byte*)statePtr, numKeys);
}
diff --git a/src/Ryujinx.Memory/MemoryBlock.cs b/src/Ryujinx.Memory/MemoryBlock.cs
index 59ee269bb..c2ba51f82 100644
--- a/src/Ryujinx.Memory/MemoryBlock.cs
+++ b/src/Ryujinx.Memory/MemoryBlock.cs
@@ -13,13 +13,13 @@ namespace Ryujinx.Memory
private readonly bool _isMirror;
private readonly bool _viewCompatible;
private readonly bool _forJit;
- private IntPtr _sharedMemory;
- private IntPtr _pointer;
+ private nint _sharedMemory;
+ private nint _pointer;
///
/// Pointer to the memory block data.
///
- public IntPtr Pointer => _pointer;
+ public nint Pointer => _pointer;
///
/// Size of the memory block.
@@ -68,7 +68,7 @@ namespace Ryujinx.Memory
/// Shared memory to use as backing storage for this block
/// Throw when there's an error while mapping the shared memory
/// Throw when the current platform is not supported
- private MemoryBlock(ulong size, IntPtr sharedMemory)
+ private MemoryBlock(ulong size, nint sharedMemory)
{
_pointer = MemoryManagement.MapSharedMemory(sharedMemory, size);
Size = size;
@@ -86,7 +86,7 @@ namespace Ryujinx.Memory
/// Throw when the current platform is not supported
public MemoryBlock CreateMirror()
{
- if (_sharedMemory == IntPtr.Zero)
+ if (_sharedMemory == nint.Zero)
{
throw new NotSupportedException("Mirroring is not supported on the memory block because the Mirrorable flag was not set.");
}
@@ -134,7 +134,7 @@ namespace Ryujinx.Memory
/// Throw when either or are out of range
public void MapView(MemoryBlock srcBlock, ulong srcOffset, ulong dstOffset, ulong size)
{
- if (srcBlock._sharedMemory == IntPtr.Zero)
+ if (srcBlock._sharedMemory == nint.Zero)
{
throw new ArgumentException("The source memory block is not mirrorable, and thus cannot be mapped on the current block.");
}
@@ -273,9 +273,9 @@ namespace Ryujinx.Memory
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe ref T GetRef(ulong offset) where T : unmanaged
{
- IntPtr ptr = _pointer;
+ nint ptr = _pointer;
- ObjectDisposedException.ThrowIf(ptr == IntPtr.Zero, this);
+ ObjectDisposedException.ThrowIf(ptr == nint.Zero, this);
int size = Unsafe.SizeOf();
@@ -298,14 +298,14 @@ namespace Ryujinx.Memory
/// Throw when the memory block has already been disposed
/// Throw when either or are out of range
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public IntPtr GetPointer(ulong offset, ulong size) => GetPointerInternal(offset, size);
+ public nint GetPointer(ulong offset, ulong size) => GetPointerInternal(offset, size);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private IntPtr GetPointerInternal(ulong offset, ulong size)
+ private nint GetPointerInternal(ulong offset, ulong size)
{
- IntPtr ptr = _pointer;
+ nint ptr = _pointer;
- ObjectDisposedException.ThrowIf(ptr == IntPtr.Zero, this);
+ ObjectDisposedException.ThrowIf(ptr == nint.Zero, this);
ulong endOffset = offset + size;
@@ -364,9 +364,9 @@ namespace Ryujinx.Memory
/// Native pointer
/// Offset to add
/// Native pointer with the added offset
- private static IntPtr PtrAddr(IntPtr pointer, ulong offset)
+ private static nint PtrAddr(nint pointer, ulong offset)
{
- return new IntPtr(pointer.ToInt64() + (long)offset);
+ return new nint(pointer.ToInt64() + (long)offset);
}
///
@@ -386,10 +386,10 @@ namespace Ryujinx.Memory
private void FreeMemory()
{
- IntPtr ptr = Interlocked.Exchange(ref _pointer, IntPtr.Zero);
+ nint ptr = Interlocked.Exchange(ref _pointer, nint.Zero);
// If pointer is null, the memory was already freed or never allocated.
- if (ptr != IntPtr.Zero)
+ if (ptr != nint.Zero)
{
if (_usesSharedMemory)
{
@@ -403,9 +403,9 @@ namespace Ryujinx.Memory
if (!_isMirror)
{
- IntPtr sharedMemory = Interlocked.Exchange(ref _sharedMemory, IntPtr.Zero);
+ nint sharedMemory = Interlocked.Exchange(ref _sharedMemory, nint.Zero);
- if (sharedMemory != IntPtr.Zero)
+ if (sharedMemory != nint.Zero)
{
MemoryManagement.DestroySharedMemory(sharedMemory);
}
diff --git a/src/Ryujinx.Memory/MemoryManagement.cs b/src/Ryujinx.Memory/MemoryManagement.cs
index 860d3f368..276cc2a4c 100644
--- a/src/Ryujinx.Memory/MemoryManagement.cs
+++ b/src/Ryujinx.Memory/MemoryManagement.cs
@@ -4,11 +4,11 @@ namespace Ryujinx.Memory
{
public static class MemoryManagement
{
- public static IntPtr Allocate(ulong size, bool forJit)
+ public static nint Allocate(ulong size, bool forJit)
{
if (OperatingSystem.IsWindows())
{
- return MemoryManagementWindows.Allocate((IntPtr)size);
+ return MemoryManagementWindows.Allocate((nint)size);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -20,11 +20,11 @@ namespace Ryujinx.Memory
}
}
- public static IntPtr Reserve(ulong size, bool forJit, bool viewCompatible)
+ public static nint Reserve(ulong size, bool forJit, bool viewCompatible)
{
if (OperatingSystem.IsWindows())
{
- return MemoryManagementWindows.Reserve((IntPtr)size, viewCompatible);
+ return MemoryManagementWindows.Reserve((nint)size, viewCompatible);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -36,11 +36,11 @@ namespace Ryujinx.Memory
}
}
- public static void Commit(IntPtr address, ulong size, bool forJit)
+ public static void Commit(nint address, ulong size, bool forJit)
{
if (OperatingSystem.IsWindows())
{
- MemoryManagementWindows.Commit(address, (IntPtr)size);
+ MemoryManagementWindows.Commit(address, (nint)size);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -52,11 +52,11 @@ namespace Ryujinx.Memory
}
}
- public static void Decommit(IntPtr address, ulong size)
+ public static void Decommit(nint address, ulong size)
{
if (OperatingSystem.IsWindows())
{
- MemoryManagementWindows.Decommit(address, (IntPtr)size);
+ MemoryManagementWindows.Decommit(address, (nint)size);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -68,11 +68,11 @@ namespace Ryujinx.Memory
}
}
- public static void MapView(IntPtr sharedMemory, ulong srcOffset, IntPtr address, ulong size, MemoryBlock owner)
+ public static void MapView(nint sharedMemory, ulong srcOffset, nint address, ulong size, MemoryBlock owner)
{
if (OperatingSystem.IsWindows())
{
- MemoryManagementWindows.MapView(sharedMemory, srcOffset, address, (IntPtr)size, owner);
+ MemoryManagementWindows.MapView(sharedMemory, srcOffset, address, (nint)size, owner);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -84,11 +84,11 @@ namespace Ryujinx.Memory
}
}
- public static void UnmapView(IntPtr sharedMemory, IntPtr address, ulong size, MemoryBlock owner)
+ public static void UnmapView(nint sharedMemory, nint address, ulong size, MemoryBlock owner)
{
if (OperatingSystem.IsWindows())
{
- MemoryManagementWindows.UnmapView(sharedMemory, address, (IntPtr)size, owner);
+ MemoryManagementWindows.UnmapView(sharedMemory, address, (nint)size, owner);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -100,13 +100,13 @@ namespace Ryujinx.Memory
}
}
- public static void Reprotect(IntPtr address, ulong size, MemoryPermission permission, bool forView, bool throwOnFail)
+ public static void Reprotect(nint address, ulong size, MemoryPermission permission, bool forView, bool throwOnFail)
{
bool result;
if (OperatingSystem.IsWindows())
{
- result = MemoryManagementWindows.Reprotect(address, (IntPtr)size, permission, forView);
+ result = MemoryManagementWindows.Reprotect(address, (nint)size, permission, forView);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -123,11 +123,11 @@ namespace Ryujinx.Memory
}
}
- public static bool Free(IntPtr address, ulong size)
+ public static bool Free(nint address, ulong size)
{
if (OperatingSystem.IsWindows())
{
- return MemoryManagementWindows.Free(address, (IntPtr)size);
+ return MemoryManagementWindows.Free(address, (nint)size);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -139,11 +139,11 @@ namespace Ryujinx.Memory
}
}
- public static IntPtr CreateSharedMemory(ulong size, bool reserve)
+ public static nint CreateSharedMemory(ulong size, bool reserve)
{
if (OperatingSystem.IsWindows())
{
- return MemoryManagementWindows.CreateSharedMemory((IntPtr)size, reserve);
+ return MemoryManagementWindows.CreateSharedMemory((nint)size, reserve);
}
else if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
{
@@ -155,7 +155,7 @@ namespace Ryujinx.Memory
}
}
- public static void DestroySharedMemory(IntPtr handle)
+ public static void DestroySharedMemory(nint handle)
{
if (OperatingSystem.IsWindows())
{
@@ -171,7 +171,7 @@ namespace Ryujinx.Memory
}
}
- public static IntPtr MapSharedMemory(IntPtr handle, ulong size)
+ public static nint MapSharedMemory(nint handle, ulong size)
{
if (OperatingSystem.IsWindows())
{
@@ -187,7 +187,7 @@ namespace Ryujinx.Memory
}
}
- public static void UnmapSharedMemory(IntPtr address, ulong size)
+ public static void UnmapSharedMemory(nint address, ulong size)
{
if (OperatingSystem.IsWindows())
{
diff --git a/src/Ryujinx.Memory/MemoryManagementUnix.cs b/src/Ryujinx.Memory/MemoryManagementUnix.cs
index e132dbbb8..76a63a466 100644
--- a/src/Ryujinx.Memory/MemoryManagementUnix.cs
+++ b/src/Ryujinx.Memory/MemoryManagementUnix.cs
@@ -10,19 +10,19 @@ namespace Ryujinx.Memory
[SupportedOSPlatform("macos")]
static class MemoryManagementUnix
{
- private static readonly ConcurrentDictionary _allocations = new();
+ private static readonly ConcurrentDictionary _allocations = new();
- public static IntPtr Allocate(ulong size, bool forJit)
+ public static nint Allocate(ulong size, bool forJit)
{
return AllocateInternal(size, MmapProts.PROT_READ | MmapProts.PROT_WRITE, forJit);
}
- public static IntPtr Reserve(ulong size, bool forJit)
+ public static nint Reserve(ulong size, bool forJit)
{
return AllocateInternal(size, MmapProts.PROT_NONE, forJit);
}
- private static IntPtr AllocateInternal(ulong size, MmapProts prot, bool forJit, bool shared = false)
+ private static nint AllocateInternal(ulong size, MmapProts prot, bool forJit, bool shared = false)
{
MmapFlags flags = MmapFlags.MAP_ANONYMOUS;
@@ -50,7 +50,7 @@ namespace Ryujinx.Memory
}
}
- IntPtr ptr = Mmap(IntPtr.Zero, size, prot, flags, -1, 0);
+ nint ptr = Mmap(nint.Zero, size, prot, flags, -1, 0);
if (ptr == MAP_FAILED)
{
@@ -66,7 +66,7 @@ namespace Ryujinx.Memory
return ptr;
}
- public static void Commit(IntPtr address, ulong size, bool forJit)
+ public static void Commit(nint address, ulong size, bool forJit)
{
MmapProts prot = MmapProts.PROT_READ | MmapProts.PROT_WRITE;
@@ -81,7 +81,7 @@ namespace Ryujinx.Memory
}
}
- public static void Decommit(IntPtr address, ulong size)
+ public static void Decommit(nint address, ulong size)
{
// Must be writable for madvise to work properly.
if (mprotect(address, size, MmapProts.PROT_READ | MmapProts.PROT_WRITE) != 0)
@@ -100,7 +100,7 @@ namespace Ryujinx.Memory
}
}
- public static bool Reprotect(IntPtr address, ulong size, MemoryPermission permission)
+ public static bool Reprotect(nint address, ulong size, MemoryPermission permission)
{
return mprotect(address, size, GetProtection(permission)) == 0;
}
@@ -119,7 +119,7 @@ namespace Ryujinx.Memory
};
}
- public static bool Free(IntPtr address)
+ public static bool Free(nint address)
{
if (_allocations.TryRemove(address, out ulong size))
{
@@ -129,12 +129,12 @@ namespace Ryujinx.Memory
return false;
}
- public static bool Unmap(IntPtr address, ulong size)
+ public static bool Unmap(nint address, ulong size)
{
return munmap(address, size) == 0;
}
- public unsafe static IntPtr CreateSharedMemory(ulong size, bool reserve)
+ public unsafe static nint CreateSharedMemory(ulong size, bool reserve)
{
int fd;
@@ -144,13 +144,13 @@ namespace Ryujinx.Memory
fixed (byte* pMemName = memName)
{
- fd = shm_open((IntPtr)pMemName, 0x2 | 0x200 | 0x800 | 0x400, 384); // O_RDWR | O_CREAT | O_EXCL | O_TRUNC, 0600
+ fd = shm_open((nint)pMemName, 0x2 | 0x200 | 0x800 | 0x400, 384); // O_RDWR | O_CREAT | O_EXCL | O_TRUNC, 0600
if (fd == -1)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
- if (shm_unlink((IntPtr)pMemName) != 0)
+ if (shm_unlink((nint)pMemName) != 0)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
@@ -162,20 +162,20 @@ namespace Ryujinx.Memory
fixed (byte* pFileName = fileName)
{
- fd = mkstemp((IntPtr)pFileName);
+ fd = mkstemp((nint)pFileName);
if (fd == -1)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
- if (unlink((IntPtr)pFileName) != 0)
+ if (unlink((nint)pFileName) != 0)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
}
}
- if (ftruncate(fd, (IntPtr)size) != 0)
+ if (ftruncate(fd, (nint)size) != 0)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
@@ -183,27 +183,27 @@ namespace Ryujinx.Memory
return fd;
}
- public static void DestroySharedMemory(IntPtr handle)
+ public static void DestroySharedMemory(nint handle)
{
close(handle.ToInt32());
}
- public static IntPtr MapSharedMemory(IntPtr handle, ulong size)
+ public static nint MapSharedMemory(nint handle, ulong size)
{
- return Mmap(IntPtr.Zero, size, MmapProts.PROT_READ | MmapProts.PROT_WRITE, MmapFlags.MAP_SHARED, handle.ToInt32(), 0);
+ return Mmap(nint.Zero, size, MmapProts.PROT_READ | MmapProts.PROT_WRITE, MmapFlags.MAP_SHARED, handle.ToInt32(), 0);
}
- public static void UnmapSharedMemory(IntPtr address, ulong size)
+ public static void UnmapSharedMemory(nint address, ulong size)
{
munmap(address, size);
}
- public static void MapView(IntPtr sharedMemory, ulong srcOffset, IntPtr location, ulong size)
+ public static void MapView(nint sharedMemory, ulong srcOffset, nint location, ulong size)
{
Mmap(location, size, MmapProts.PROT_READ | MmapProts.PROT_WRITE, MmapFlags.MAP_FIXED | MmapFlags.MAP_SHARED, sharedMemory.ToInt32(), (long)srcOffset);
}
- public static void UnmapView(IntPtr location, ulong size)
+ public static void UnmapView(nint location, ulong size)
{
Mmap(location, size, MmapProts.PROT_NONE, MmapFlags.MAP_FIXED | MmapFlags.MAP_PRIVATE | MmapFlags.MAP_ANONYMOUS | MmapFlags.MAP_NORESERVE, -1, 0);
}
diff --git a/src/Ryujinx.Memory/MemoryManagementWindows.cs b/src/Ryujinx.Memory/MemoryManagementWindows.cs
index 742ef6c96..468355dd0 100644
--- a/src/Ryujinx.Memory/MemoryManagementWindows.cs
+++ b/src/Ryujinx.Memory/MemoryManagementWindows.cs
@@ -12,16 +12,16 @@ namespace Ryujinx.Memory
private static readonly PlaceholderManager _placeholders = new();
- public static IntPtr Allocate(IntPtr size)
+ public static nint Allocate(nint size)
{
return AllocateInternal(size, AllocationType.Reserve | AllocationType.Commit);
}
- public static IntPtr Reserve(IntPtr size, bool viewCompatible)
+ public static nint Reserve(nint size, bool viewCompatible)
{
if (viewCompatible)
{
- IntPtr baseAddress = AllocateInternal2(size, AllocationType.Reserve | AllocationType.ReservePlaceholder);
+ nint baseAddress = AllocateInternal2(size, AllocationType.Reserve | AllocationType.ReservePlaceholder);
_placeholders.ReserveRange((ulong)baseAddress, (ulong)size);
@@ -31,11 +31,11 @@ namespace Ryujinx.Memory
return AllocateInternal(size, AllocationType.Reserve);
}
- private static IntPtr AllocateInternal(IntPtr size, AllocationType flags = 0)
+ private static nint AllocateInternal(nint size, AllocationType flags = 0)
{
- IntPtr ptr = WindowsApi.VirtualAlloc(IntPtr.Zero, size, flags, MemoryProtection.ReadWrite);
+ nint ptr = WindowsApi.VirtualAlloc(nint.Zero, size, flags, MemoryProtection.ReadWrite);
- if (ptr == IntPtr.Zero)
+ if (ptr == nint.Zero)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
@@ -43,11 +43,11 @@ namespace Ryujinx.Memory
return ptr;
}
- private static IntPtr AllocateInternal2(IntPtr size, AllocationType flags = 0)
+ private static nint AllocateInternal2(nint size, AllocationType flags = 0)
{
- IntPtr ptr = WindowsApi.VirtualAlloc2(WindowsApi.CurrentProcessHandle, IntPtr.Zero, size, flags, MemoryProtection.NoAccess, IntPtr.Zero, 0);
+ nint ptr = WindowsApi.VirtualAlloc2(WindowsApi.CurrentProcessHandle, nint.Zero, size, flags, MemoryProtection.NoAccess, nint.Zero, 0);
- if (ptr == IntPtr.Zero)
+ if (ptr == nint.Zero)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
@@ -55,15 +55,15 @@ namespace Ryujinx.Memory
return ptr;
}
- public static void Commit(IntPtr location, IntPtr size)
+ public static void Commit(nint location, nint size)
{
- if (WindowsApi.VirtualAlloc(location, size, AllocationType.Commit, MemoryProtection.ReadWrite) == IntPtr.Zero)
+ if (WindowsApi.VirtualAlloc(location, size, AllocationType.Commit, MemoryProtection.ReadWrite) == nint.Zero)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
}
- public static void Decommit(IntPtr location, IntPtr size)
+ public static void Decommit(nint location, nint size)
{
if (!WindowsApi.VirtualFree(location, size, AllocationType.Decommit))
{
@@ -71,17 +71,17 @@ namespace Ryujinx.Memory
}
}
- public static void MapView(IntPtr sharedMemory, ulong srcOffset, IntPtr location, IntPtr size, MemoryBlock owner)
+ public static void MapView(nint sharedMemory, ulong srcOffset, nint location, nint size, MemoryBlock owner)
{
_placeholders.MapView(sharedMemory, srcOffset, location, size, owner);
}
- public static void UnmapView(IntPtr sharedMemory, IntPtr location, IntPtr size, MemoryBlock owner)
+ public static void UnmapView(nint sharedMemory, nint location, nint size, MemoryBlock owner)
{
_placeholders.UnmapView(sharedMemory, location, size, owner);
}
- public static bool Reprotect(IntPtr address, IntPtr size, MemoryPermission permission, bool forView)
+ public static bool Reprotect(nint address, nint size, MemoryPermission permission, bool forView)
{
if (forView)
{
@@ -93,26 +93,26 @@ namespace Ryujinx.Memory
}
}
- public static bool Free(IntPtr address, IntPtr size)
+ public static bool Free(nint address, nint size)
{
_placeholders.UnreserveRange((ulong)address, (ulong)size);
- return WindowsApi.VirtualFree(address, IntPtr.Zero, AllocationType.Release);
+ return WindowsApi.VirtualFree(address, nint.Zero, AllocationType.Release);
}
- public static IntPtr CreateSharedMemory(IntPtr size, bool reserve)
+ public static nint CreateSharedMemory(nint size, bool reserve)
{
var prot = reserve ? FileMapProtection.SectionReserve : FileMapProtection.SectionCommit;
- IntPtr handle = WindowsApi.CreateFileMapping(
+ nint handle = WindowsApi.CreateFileMapping(
WindowsApi.InvalidHandleValue,
- IntPtr.Zero,
+ nint.Zero,
FileMapProtection.PageReadWrite | prot,
(uint)(size.ToInt64() >> 32),
(uint)size.ToInt64(),
null);
- if (handle == IntPtr.Zero)
+ if (handle == nint.Zero)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
@@ -120,7 +120,7 @@ namespace Ryujinx.Memory
return handle;
}
- public static void DestroySharedMemory(IntPtr handle)
+ public static void DestroySharedMemory(nint handle)
{
if (!WindowsApi.CloseHandle(handle))
{
@@ -128,11 +128,11 @@ namespace Ryujinx.Memory
}
}
- public static IntPtr MapSharedMemory(IntPtr handle)
+ public static nint MapSharedMemory(nint handle)
{
- IntPtr ptr = WindowsApi.MapViewOfFile(handle, 4 | 2, 0, 0, IntPtr.Zero);
+ nint ptr = WindowsApi.MapViewOfFile(handle, 4 | 2, 0, 0, nint.Zero);
- if (ptr == IntPtr.Zero)
+ if (ptr == nint.Zero)
{
throw new SystemException(Marshal.GetLastPInvokeErrorMessage());
}
@@ -140,7 +140,7 @@ namespace Ryujinx.Memory
return ptr;
}
- public static void UnmapSharedMemory(IntPtr address)
+ public static void UnmapSharedMemory(nint address)
{
if (!WindowsApi.UnmapViewOfFile(address))
{
diff --git a/src/Ryujinx.Memory/MemoryManagerUnixHelper.cs b/src/Ryujinx.Memory/MemoryManagerUnixHelper.cs
index 43888c85b..e5a0b7a4d 100644
--- a/src/Ryujinx.Memory/MemoryManagerUnixHelper.cs
+++ b/src/Ryujinx.Memory/MemoryManagerUnixHelper.cs
@@ -44,7 +44,7 @@ namespace Ryujinx.Memory
O_SYNC = 256,
}
- public const IntPtr MAP_FAILED = -1;
+ public const nint MAP_FAILED = -1;
private const int MAP_ANONYMOUS_LINUX_GENERIC = 0x20;
private const int MAP_NORESERVE_LINUX_GENERIC = 0x4000;
@@ -57,37 +57,37 @@ namespace Ryujinx.Memory
public const int MADV_REMOVE = 9;
[LibraryImport("libc", EntryPoint = "mmap", SetLastError = true)]
- private static partial IntPtr Internal_mmap(IntPtr address, ulong length, MmapProts prot, int flags, int fd, long offset);
+ private static partial nint Internal_mmap(nint address, ulong length, MmapProts prot, int flags, int fd, long offset);
[LibraryImport("libc", SetLastError = true)]
- public static partial int mprotect(IntPtr address, ulong length, MmapProts prot);
+ public static partial int mprotect(nint address, ulong length, MmapProts prot);
[LibraryImport("libc", SetLastError = true)]
- public static partial int munmap(IntPtr address, ulong length);
+ public static partial int munmap(nint address, ulong length);
[LibraryImport("libc", SetLastError = true)]
- public static partial IntPtr mremap(IntPtr old_address, ulong old_size, ulong new_size, int flags, IntPtr new_address);
+ public static partial nint mremap(nint old_address, ulong old_size, ulong new_size, int flags, nint new_address);
[LibraryImport("libc", SetLastError = true)]
- public static partial int madvise(IntPtr address, ulong size, int advice);
+ public static partial int madvise(nint address, ulong size, int advice);
[LibraryImport("libc", SetLastError = true)]
- public static partial int mkstemp(IntPtr template);
+ public static partial int mkstemp(nint template);
[LibraryImport("libc", SetLastError = true)]
- public static partial int unlink(IntPtr pathname);
+ public static partial int unlink(nint pathname);
[LibraryImport("libc", SetLastError = true)]
- public static partial int ftruncate(int fildes, IntPtr length);
+ public static partial int ftruncate(int fildes, nint length);
[LibraryImport("libc", SetLastError = true)]
public static partial int close(int fd);
[LibraryImport("libc", SetLastError = true)]
- public static partial int shm_open(IntPtr name, int oflag, uint mode);
+ public static partial int shm_open(nint name, int oflag, uint mode);
[LibraryImport("libc", SetLastError = true)]
- public static partial int shm_unlink(IntPtr name);
+ public static partial int shm_unlink(nint name);
private static int MmapFlagsToSystemFlags(MmapFlags flags)
{
@@ -164,7 +164,7 @@ namespace Ryujinx.Memory
return result;
}
- public static IntPtr Mmap(IntPtr address, ulong length, MmapProts prot, MmapFlags flags, int fd, long offset)
+ public static nint Mmap(nint address, ulong length, MmapProts prot, MmapFlags flags, int fd, long offset)
{
return Internal_mmap(address, length, prot, MmapFlagsToSystemFlags(flags), fd, offset);
}
diff --git a/src/Ryujinx.Memory/WindowsShared/PlaceholderManager.cs b/src/Ryujinx.Memory/WindowsShared/PlaceholderManager.cs
index b68a076c4..2a294bba9 100644
--- a/src/Ryujinx.Memory/WindowsShared/PlaceholderManager.cs
+++ b/src/Ryujinx.Memory/WindowsShared/PlaceholderManager.cs
@@ -18,7 +18,7 @@ namespace Ryujinx.Memory.WindowsShared
private readonly MappingTree _mappings;
private readonly MappingTree _protections;
- private readonly IntPtr _partialUnmapStatePtr;
+ private readonly nint _partialUnmapStatePtr;
private readonly Thread _partialUnmapTrimThread;
///
@@ -100,7 +100,7 @@ namespace Ryujinx.Memory.WindowsShared
if (IsMapped(node.Value))
{
- if (!WindowsApi.UnmapViewOfFile2(WindowsApi.CurrentProcessHandle, (IntPtr)node.Start, 2))
+ if (!WindowsApi.UnmapViewOfFile2(WindowsApi.CurrentProcessHandle, (nint)node.Start, 2))
{
throw new WindowsApiException("UnmapViewOfFile2");
}
@@ -126,7 +126,7 @@ namespace Ryujinx.Memory.WindowsShared
/// Address to map the view into
/// Size of the view in bytes
/// Memory block that owns the mapping
- public void MapView(IntPtr sharedMemory, ulong srcOffset, IntPtr location, IntPtr size, MemoryBlock owner)
+ public void MapView(nint sharedMemory, ulong srcOffset, nint location, nint size, MemoryBlock owner)
{
ref var partialUnmapLock = ref GetPartialUnmapState().PartialUnmapLock;
partialUnmapLock.AcquireReaderLock();
@@ -151,7 +151,7 @@ namespace Ryujinx.Memory.WindowsShared
/// Size of the view in bytes
/// Indicates if the memory protections should be updated after the map
/// Thrown when the Windows API returns an error mapping the memory
- private void MapViewInternal(IntPtr sharedMemory, ulong srcOffset, IntPtr location, IntPtr size, bool updateProtection)
+ private void MapViewInternal(nint sharedMemory, ulong srcOffset, nint location, nint size, bool updateProtection)
{
SplitForMap((ulong)location, (ulong)size, srcOffset);
@@ -163,10 +163,10 @@ namespace Ryujinx.Memory.WindowsShared
size,
0x4000,
MemoryProtection.ReadWrite,
- IntPtr.Zero,
+ nint.Zero,
0);
- if (ptr == IntPtr.Zero)
+ if (ptr == nint.Zero)
{
throw new WindowsApiException("MapViewOfFile3");
}
@@ -210,8 +210,8 @@ namespace Ryujinx.Memory.WindowsShared
if (overlapStartsBefore && overlapEndsAfter)
{
CheckFreeResult(WindowsApi.VirtualFree(
- (IntPtr)address,
- (IntPtr)size,
+ (nint)address,
+ (nint)size,
AllocationType.Release | AllocationType.PreservePlaceholder));
_mappings.Add(new RangeNode(overlapStart, address, overlapValue));
@@ -222,8 +222,8 @@ namespace Ryujinx.Memory.WindowsShared
ulong overlappedSize = overlapEnd - address;
CheckFreeResult(WindowsApi.VirtualFree(
- (IntPtr)address,
- (IntPtr)overlappedSize,
+ (nint)address,
+ (nint)overlappedSize,
AllocationType.Release | AllocationType.PreservePlaceholder));
_mappings.Add(new RangeNode(overlapStart, address, overlapValue));
@@ -233,8 +233,8 @@ namespace Ryujinx.Memory.WindowsShared
ulong overlappedSize = endAddress - overlapStart;
CheckFreeResult(WindowsApi.VirtualFree(
- (IntPtr)overlapStart,
- (IntPtr)overlappedSize,
+ (nint)overlapStart,
+ (nint)overlappedSize,
AllocationType.Release | AllocationType.PreservePlaceholder));
_mappings.Add(new RangeNode(endAddress, overlapEnd, AddBackingOffset(overlapValue, overlappedSize)));
@@ -255,7 +255,7 @@ namespace Ryujinx.Memory.WindowsShared
/// Address to unmap
/// Size of the region to unmap in bytes
/// Memory block that owns the mapping
- public void UnmapView(IntPtr sharedMemory, IntPtr location, IntPtr size, MemoryBlock owner)
+ public void UnmapView(nint sharedMemory, nint location, nint size, MemoryBlock owner)
{
ref var partialUnmapLock = ref GetPartialUnmapState().PartialUnmapLock;
partialUnmapLock.AcquireReaderLock();
@@ -283,7 +283,7 @@ namespace Ryujinx.Memory.WindowsShared
/// Memory block that owns the mapping
/// Indicates if the memory protections should be updated after the unmap
/// Thrown when the Windows API returns an error unmapping or remapping the memory
- private void UnmapViewInternal(IntPtr sharedMemory, IntPtr location, IntPtr size, MemoryBlock owner, bool updateProtection)
+ private void UnmapViewInternal(nint sharedMemory, nint location, nint size, MemoryBlock owner, bool updateProtection)
{
ulong startAddress = (ulong)location;
ulong unmapSize = (ulong)size;
@@ -327,7 +327,7 @@ namespace Ryujinx.Memory.WindowsShared
{
partialUnmapState.PartialUnmapsCount++;
- if (!WindowsApi.UnmapViewOfFile2(WindowsApi.CurrentProcessHandle, (IntPtr)overlap.Start, 2))
+ if (!WindowsApi.UnmapViewOfFile2(WindowsApi.CurrentProcessHandle, (nint)overlap.Start, 2))
{
throw new WindowsApiException("UnmapViewOfFile2");
}
@@ -336,7 +336,7 @@ namespace Ryujinx.Memory.WindowsShared
{
ulong remapSize = startAddress - overlap.Start;
- MapViewInternal(sharedMemory, overlap.Value, (IntPtr)overlap.Start, (IntPtr)remapSize, updateProtection: false);
+ MapViewInternal(sharedMemory, overlap.Value, (nint)overlap.Start, (nint)remapSize, updateProtection: false);
RestoreRangeProtection(overlap.Start, remapSize);
}
@@ -347,7 +347,7 @@ namespace Ryujinx.Memory.WindowsShared
ulong remapAddress = overlap.Start + overlappedSize;
ulong remapSize = overlap.End - endAddress;
- MapViewInternal(sharedMemory, remapBackingOffset, (IntPtr)remapAddress, (IntPtr)remapSize, updateProtection: false);
+ MapViewInternal(sharedMemory, remapBackingOffset, (nint)remapAddress, (nint)remapSize, updateProtection: false);
RestoreRangeProtection(remapAddress, remapSize);
}
}
@@ -356,7 +356,7 @@ namespace Ryujinx.Memory.WindowsShared
partialUnmapLock.DowngradeFromWriterLock();
}
}
- else if (!WindowsApi.UnmapViewOfFile2(WindowsApi.CurrentProcessHandle, (IntPtr)overlap.Start, 2))
+ else if (!WindowsApi.UnmapViewOfFile2(WindowsApi.CurrentProcessHandle, (nint)overlap.Start, 2))
{
throw new WindowsApiException("UnmapViewOfFile2");
}
@@ -441,8 +441,8 @@ namespace Ryujinx.Memory.WindowsShared
size = endAddress - address;
CheckFreeResult(WindowsApi.VirtualFree(
- (IntPtr)address,
- (IntPtr)size,
+ (nint)address,
+ (nint)size,
AllocationType.Release | AllocationType.CoalescePlaceholders));
}
}
@@ -454,7 +454,7 @@ namespace Ryujinx.Memory.WindowsShared
/// Size of the region to reprotect in bytes
/// New permissions
/// True if the reprotection was successful, false otherwise
- public bool ReprotectView(IntPtr address, IntPtr size, MemoryPermission permission)
+ public bool ReprotectView(nint address, nint size, MemoryPermission permission)
{
ref var partialUnmapLock = ref GetPartialUnmapState().PartialUnmapLock;
partialUnmapLock.AcquireReaderLock();
@@ -478,7 +478,7 @@ namespace Ryujinx.Memory.WindowsShared
/// Throw an exception instead of returning an error if the operation fails
/// True if the reprotection was successful or if is true, false otherwise
/// If is true, it is thrown when the Windows API returns an error reprotecting the memory
- private bool ReprotectViewInternal(IntPtr address, IntPtr size, MemoryPermission permission, bool throwOnError)
+ private bool ReprotectViewInternal(nint address, nint size, MemoryPermission permission, bool throwOnError)
{
ulong reprotectAddress = (ulong)address;
ulong reprotectSize = (ulong)size;
@@ -514,7 +514,7 @@ namespace Ryujinx.Memory.WindowsShared
mappedSize -= delta;
}
- if (!WindowsApi.VirtualProtect((IntPtr)mappedAddress, (IntPtr)mappedSize, WindowsApi.GetProtection(permission), out _))
+ if (!WindowsApi.VirtualProtect((nint)mappedAddress, (nint)mappedSize, WindowsApi.GetProtection(permission), out _))
{
if (throwOnError)
{
@@ -729,7 +729,7 @@ namespace Ryujinx.Memory.WindowsShared
protEndAddress = endAddress;
}
- ReprotectViewInternal((IntPtr)protAddress, (IntPtr)(protEndAddress - protAddress), protection.Value, true);
+ ReprotectViewInternal((nint)protAddress, (nint)(protEndAddress - protAddress), protection.Value, true);
}
}
}
diff --git a/src/Ryujinx.Memory/WindowsShared/WindowsApi.cs b/src/Ryujinx.Memory/WindowsShared/WindowsApi.cs
index 82903c05f..0d002dada 100644
--- a/src/Ryujinx.Memory/WindowsShared/WindowsApi.cs
+++ b/src/Ryujinx.Memory/WindowsShared/WindowsApi.cs
@@ -7,42 +7,42 @@ namespace Ryujinx.Memory.WindowsShared
[SupportedOSPlatform("windows")]
static partial class WindowsApi
{
- public static readonly IntPtr InvalidHandleValue = new(-1);
- public static readonly IntPtr CurrentProcessHandle = new(-1);
+ public static readonly nint InvalidHandleValue = new(-1);
+ public static readonly nint CurrentProcessHandle = new(-1);
[LibraryImport("kernel32.dll", SetLastError = true)]
- public static partial IntPtr VirtualAlloc(
- IntPtr lpAddress,
- IntPtr dwSize,
+ public static partial nint VirtualAlloc(
+ nint lpAddress,
+ nint dwSize,
AllocationType flAllocationType,
MemoryProtection flProtect);
[LibraryImport("KernelBase.dll", SetLastError = true)]
- public static partial IntPtr VirtualAlloc2(
- IntPtr process,
- IntPtr lpAddress,
- IntPtr dwSize,
+ public static partial nint VirtualAlloc2(
+ nint process,
+ nint lpAddress,
+ nint dwSize,
AllocationType flAllocationType,
MemoryProtection flProtect,
- IntPtr extendedParameters,
+ nint extendedParameters,
ulong parameterCount);
[LibraryImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static partial bool VirtualProtect(
- IntPtr lpAddress,
- IntPtr dwSize,
+ nint lpAddress,
+ nint dwSize,
MemoryProtection flNewProtect,
out MemoryProtection lpflOldProtect);
[LibraryImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- public static partial bool VirtualFree(IntPtr lpAddress, IntPtr dwSize, AllocationType dwFreeType);
+ public static partial bool VirtualFree(nint lpAddress, nint dwSize, AllocationType dwFreeType);
[LibraryImport("kernel32.dll", SetLastError = true, EntryPoint = "CreateFileMappingW")]
- public static partial IntPtr CreateFileMapping(
- IntPtr hFile,
- IntPtr lpFileMappingAttributes,
+ public static partial nint CreateFileMapping(
+ nint hFile,
+ nint lpFileMappingAttributes,
FileMapProtection flProtect,
uint dwMaximumSizeHigh,
uint dwMaximumSizeLow,
@@ -50,35 +50,35 @@ namespace Ryujinx.Memory.WindowsShared
[LibraryImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- public static partial bool CloseHandle(IntPtr hObject);
+ public static partial bool CloseHandle(nint hObject);
[LibraryImport("kernel32.dll", SetLastError = true)]
- public static partial IntPtr MapViewOfFile(
- IntPtr hFileMappingObject,
+ public static partial nint MapViewOfFile(
+ nint hFileMappingObject,
uint dwDesiredAccess,
uint dwFileOffsetHigh,
uint dwFileOffsetLow,
- IntPtr dwNumberOfBytesToMap);
+ nint dwNumberOfBytesToMap);
[LibraryImport("KernelBase.dll", SetLastError = true)]
- public static partial IntPtr MapViewOfFile3(
- IntPtr hFileMappingObject,
- IntPtr process,
- IntPtr baseAddress,
+ public static partial nint MapViewOfFile3(
+ nint hFileMappingObject,
+ nint process,
+ nint baseAddress,
ulong offset,
- IntPtr dwNumberOfBytesToMap,
+ nint dwNumberOfBytesToMap,
ulong allocationType,
MemoryProtection dwDesiredAccess,
- IntPtr extendedParameters,
+ nint extendedParameters,
ulong parameterCount);
[LibraryImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- public static partial bool UnmapViewOfFile(IntPtr lpBaseAddress);
+ public static partial bool UnmapViewOfFile(nint lpBaseAddress);
[LibraryImport("KernelBase.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- public static partial bool UnmapViewOfFile2(IntPtr process, IntPtr lpBaseAddress, ulong unmapFlags);
+ public static partial bool UnmapViewOfFile2(nint process, nint lpBaseAddress, ulong unmapFlags);
[LibraryImport("kernel32.dll")]
public static partial uint GetLastError();
diff --git a/src/Ryujinx.Tests/Memory/MockMemoryManager.cs b/src/Ryujinx.Tests/Memory/MockMemoryManager.cs
index 20c318de6..207d28f50 100644
--- a/src/Ryujinx.Tests/Memory/MockMemoryManager.cs
+++ b/src/Ryujinx.Tests/Memory/MockMemoryManager.cs
@@ -7,7 +7,7 @@ namespace Ryujinx.Tests.Memory
{
public int AddressSpaceBits => throw new NotImplementedException();
- public IntPtr PageTablePointer => throw new NotImplementedException();
+ public nint PageTablePointer => throw new NotImplementedException();
public MemoryManagerType Type => MemoryManagerType.HostMappedUnsafe;
diff --git a/src/Ryujinx.Tests/Memory/PartialUnmaps.cs b/src/Ryujinx.Tests/Memory/PartialUnmaps.cs
index ace68e5c2..6d2ad8fb0 100644
--- a/src/Ryujinx.Tests/Memory/PartialUnmaps.cs
+++ b/src/Ryujinx.Tests/Memory/PartialUnmaps.cs
@@ -237,7 +237,7 @@ namespace Ryujinx.Tests.Memory
mainMemory.MapView(backing, 0, 0, vaSize);
var writeFunc = TestMethods.GenerateDebugNativeWriteLoop();
- IntPtr writePtr = mainMemory.GetPointer(vaSize - 0x1000, 4);
+ nint writePtr = mainMemory.GetPointer(vaSize - 0x1000, 4);
Thread testThread = new(() =>
{
@@ -330,7 +330,7 @@ namespace Ryujinx.Tests.Memory
fixed (void* localMap = &state.LocalCounts)
{
- var getOrReserve = TestMethods.GenerateDebugThreadLocalMapGetOrReserve((IntPtr)localMap);
+ var getOrReserve = TestMethods.GenerateDebugThreadLocalMapGetOrReserve((nint)localMap);
for (int i = 0; i < ThreadLocalMap.MapSize; i++)
{
diff --git a/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs b/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs
index ff8d9b141..044eccbea 100644
--- a/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs
+++ b/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs
@@ -1,5 +1,6 @@
using DynamicData;
using DynamicData.Kernel;
+using Gommon;
using LibHac;
using LibHac.Common;
using LibHac.Fs;
@@ -677,19 +678,18 @@ namespace Ryujinx.UI.App.Common
EnumerationOptions options = new()
{
RecurseSubdirectories = true,
- IgnoreInaccessible = false,
+ IgnoreInaccessible = false
};
- IEnumerable files = Directory.EnumerateFiles(appDir, "*", options).Where(file =>
- {
- return
- (Path.GetExtension(file).ToLower() is ".nsp" && ConfigurationState.Instance.UI.ShownFileTypes.NSP.Value) ||
- (Path.GetExtension(file).ToLower() is ".pfs0" && ConfigurationState.Instance.UI.ShownFileTypes.PFS0.Value) ||
- (Path.GetExtension(file).ToLower() is ".xci" && ConfigurationState.Instance.UI.ShownFileTypes.XCI.Value) ||
- (Path.GetExtension(file).ToLower() is ".nca" && ConfigurationState.Instance.UI.ShownFileTypes.NCA.Value) ||
- (Path.GetExtension(file).ToLower() is ".nro" && ConfigurationState.Instance.UI.ShownFileTypes.NRO.Value) ||
- (Path.GetExtension(file).ToLower() is ".nso" && ConfigurationState.Instance.UI.ShownFileTypes.NSO.Value);
- });
+ IEnumerable files = Directory.EnumerateFiles(appDir, "*", options)
+ .Where(file =>
+ (Path.GetExtension(file).ToLower() is ".nsp" && ConfigurationState.Instance.UI.ShownFileTypes.NSP) ||
+ (Path.GetExtension(file).ToLower() is ".pfs0" && ConfigurationState.Instance.UI.ShownFileTypes.PFS0) ||
+ (Path.GetExtension(file).ToLower() is ".xci" && ConfigurationState.Instance.UI.ShownFileTypes.XCI) ||
+ (Path.GetExtension(file).ToLower() is ".nca" && ConfigurationState.Instance.UI.ShownFileTypes.NCA) ||
+ (Path.GetExtension(file).ToLower() is ".nro" && ConfigurationState.Instance.UI.ShownFileTypes.NRO) ||
+ (Path.GetExtension(file).ToLower() is ".nso" && ConfigurationState.Instance.UI.ShownFileTypes.NSO)
+ );
foreach (string app in files)
{
@@ -802,17 +802,31 @@ namespace Ryujinx.UI.App.Common
// Searches the provided directories for DLC NSP files that are _valid for the currently detected games in the
// library_, and then enables those DLC.
- public int AutoLoadDownloadableContents(List appDirs)
+ public int AutoLoadDownloadableContents(List appDirs, out int numDlcRemoved)
{
_cancellationToken = new CancellationTokenSource();
List dlcPaths = new();
int newDlcLoaded = 0;
+ numDlcRemoved = 0;
try
{
+ // Remove any downloadable content which can no longer be located on disk
+ Logger.Notice.Print(LogClass.Application, $"Removing non-existing Title DLCs");
+ var dlcToRemove = _downloadableContents.Items
+ .Where(dlc => !File.Exists(dlc.Dlc.ContainerPath))
+ .ToList();
+ dlcToRemove.ForEach(dlc =>
+ Logger.Warning?.Print(LogClass.Application, $"Title DLC removed: {dlc.Dlc.ContainerPath}")
+ );
+ numDlcRemoved += dlcToRemove.Distinct().Count();
+ _downloadableContents.RemoveKeys(dlcToRemove.Select(dlc => dlc.Dlc));
+
foreach (string appDir in appDirs)
{
+ Logger.Notice.Print(LogClass.Application, $"Auto loading DLC from: {appDir}");
+
if (_cancellationToken.Token.IsCancellationRequested)
{
return newDlcLoaded;
@@ -901,17 +915,37 @@ namespace Ryujinx.UI.App.Common
// Searches the provided directories for update NSP files that are _valid for the currently detected games in the
// library_, and then applies those updates. If a newly-detected update is a newer version than the currently
// selected update (or if no update is currently selected), then that update will be selected.
- public int AutoLoadTitleUpdates(List appDirs)
+ public int AutoLoadTitleUpdates(List appDirs, out int numUpdatesRemoved)
{
_cancellationToken = new CancellationTokenSource();
List updatePaths = new();
int numUpdatesLoaded = 0;
+ numUpdatesRemoved = 0;
try
{
+ var titleIdsToSave = new HashSet();
+ var titleIdsToRefresh = new HashSet();
+
+ // Remove any updates which can no longer be located on disk
+ Logger.Notice.Print(LogClass.Application, $"Removing non-existing Title Updates");
+ var updatesToRemove = _titleUpdates.Items
+ .Where(it => !File.Exists(it.TitleUpdate.Path))
+ .ToList();
+
+ numUpdatesRemoved += updatesToRemove.Select(it => it.TitleUpdate).Distinct().Count();
+ updatesToRemove.ForEach(ti =>
+ Logger.Warning?.Print(LogClass.Application, $"Title update removed: {ti.TitleUpdate.Path}")
+ );
+ _titleUpdates.RemoveKeys(updatesToRemove.Select(it => it.TitleUpdate));
+ titleIdsToSave.UnionWith(updatesToRemove.Select(it => it.TitleUpdate.TitleIdBase));
+ titleIdsToRefresh.UnionWith(updatesToRemove.Where(it => it.IsSelected).Select(update => update.TitleUpdate.TitleIdBase));
+
foreach (string appDir in appDirs)
{
+ Logger.Notice.Print(LogClass.Application, $"Auto loading updates from: {appDir}");
+
if (_cancellationToken.Token.IsCancellationRequested)
{
return numUpdatesLoaded;
@@ -980,27 +1014,21 @@ namespace Ryujinx.UI.App.Common
{
if (!_titleUpdates.Lookup(update).HasValue)
{
- var currentlySelected = TitleUpdates.Items.FirstOrOptional(it =>
- it.TitleUpdate.TitleIdBase == update.TitleIdBase && it.IsSelected);
-
- var shouldSelect = !currentlySelected.HasValue ||
- currentlySelected.Value.TitleUpdate.Version < update.Version;
- _titleUpdates.AddOrUpdate((update, shouldSelect));
-
- if (currentlySelected.HasValue && shouldSelect)
- _titleUpdates.AddOrUpdate((currentlySelected.Value.TitleUpdate, false));
-
- SaveTitleUpdatesForGame(update.TitleIdBase);
+ bool shouldSelect = AddAndAutoSelectUpdate(update);
+ titleIdsToSave.Add(update.TitleIdBase);
numUpdatesLoaded++;
if (shouldSelect)
{
- RefreshApplicationInfo(update.TitleIdBase);
+ titleIdsToRefresh.Add(update.TitleIdBase);
}
}
}
}
}
+
+ titleIdsToSave.ForEach(titleId => SaveTitleUpdatesForGame(titleId));
+ titleIdsToRefresh.ForEach(titleId => RefreshApplicationInfo(titleId));
}
finally
{
@@ -1011,6 +1039,24 @@ namespace Ryujinx.UI.App.Common
return numUpdatesLoaded;
}
+ private bool AddAndAutoSelectUpdate(TitleUpdateModel update)
+ {
+ var currentlySelected = TitleUpdates.Items.FirstOrOptional(it =>
+ it.TitleUpdate.TitleIdBase == update.TitleIdBase && it.IsSelected);
+
+ var shouldSelect = !currentlySelected.HasValue ||
+ currentlySelected.Value.TitleUpdate.Version < update.Version;
+
+ _titleUpdates.AddOrUpdate((update, shouldSelect));
+
+ if (currentlySelected.HasValue && shouldSelect)
+ {
+ _titleUpdates.AddOrUpdate((currentlySelected.Value.TitleUpdate, false));
+ }
+
+ return shouldSelect;
+ }
+
protected void OnApplicationCountUpdated(ApplicationCountUpdatedEventArgs e)
{
ApplicationCountUpdated?.Invoke(null, e);
@@ -1395,8 +1441,8 @@ namespace Ryujinx.UI.App.Common
if (TryGetTitleUpdatesFromFile(application.Path, out var bundledUpdates))
{
var savedUpdateLookup = savedUpdates.Select(update => update.Item1).ToHashSet();
+ bool updatesChanged = false;
- bool addedNewUpdate = false;
foreach (var update in bundledUpdates.OrderByDescending(bundled => bundled.Version))
{
if (!savedUpdateLookup.Contains(update))
@@ -1405,17 +1451,19 @@ namespace Ryujinx.UI.App.Common
if (!selectedUpdate.HasValue || selectedUpdate.Value.Item1.Version < update.Version)
{
shouldSelect = true;
- selectedUpdate = Optional<(TitleUpdateModel, bool IsSelected)>.Create((update, true));
+ if (selectedUpdate.HasValue)
+ _titleUpdates.AddOrUpdate((selectedUpdate.Value.Item1, false));
+ selectedUpdate = DynamicData.Kernel.Optional<(TitleUpdateModel, bool IsSelected)>.Create((update, true));
}
modifiedVersion = modifiedVersion || shouldSelect;
it.AddOrUpdate((update, shouldSelect));
- addedNewUpdate = true;
+ updatesChanged = true;
}
}
- if (addedNewUpdate)
+ if (updatesChanged)
{
var gameUpdates = it.Items.Where(update => update.TitleUpdate.TitleIdBase == application.IdBase).ToList();
TitleUpdatesHelper.SaveTitleUpdatesJson(_virtualFileSystem, application.IdBase, gameUpdates);
diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs
index 89dcdb3ad..1eb970016 100644
--- a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs
+++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs
@@ -16,7 +16,7 @@ namespace Ryujinx.UI.Common.Configuration
///
/// The current version of the file format
///
- public const int CurrentVersion = 54;
+ public const int CurrentVersion = 55;
///
/// Version of the configuration file format
@@ -163,6 +163,11 @@ namespace Ryujinx.UI.Common.Configuration
///
public bool ShowConfirmExit { get; set; }
+ ///
+ /// ignore "Applet" dialog
+ ///
+ public bool IgnoreApplet { get; set; }
+
///
/// Enables or disables save window size, position and state on close.
///
diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs
index b1f1f2052..89aaaabbe 100644
--- a/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs
+++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs
@@ -325,12 +325,12 @@ namespace Ryujinx.UI.Common.Configuration
public ReactiveObject EnableDockedMode { get; private set; }
///
- /// Enables or disables profiled translation cache persistency
+ /// Enables or disables persistent profiled translation cache
///
public ReactiveObject EnablePtc { get; private set; }
///
- /// Enables or disables low-power profiled translation cache persistency loading
+ /// Enables or disables low-power persistent profiled translation cache loading
///
public ReactiveObject EnableLowPowerPtc { get; private set; }
@@ -642,6 +642,11 @@ namespace Ryujinx.UI.Common.Configuration
///
public ReactiveObject ShowConfirmExit { get; private set; }
+ ///
+ /// Ignore Applet
+ ///
+ public ReactiveObject IgnoreApplet { get; private set; }
+
///
/// Enables or disables save window size, position and state on close.
///
@@ -668,6 +673,7 @@ namespace Ryujinx.UI.Common.Configuration
EnableDiscordIntegration = new ReactiveObject();
CheckUpdatesOnStart = new ReactiveObject();
ShowConfirmExit = new ReactiveObject();
+ IgnoreApplet = new ReactiveObject();
RememberWindowState = new ReactiveObject();
EnableHardwareAcceleration = new ReactiveObject();
HideCursor = new ReactiveObject();
@@ -706,6 +712,7 @@ namespace Ryujinx.UI.Common.Configuration
EnableDiscordIntegration = EnableDiscordIntegration,
CheckUpdatesOnStart = CheckUpdatesOnStart,
ShowConfirmExit = ShowConfirmExit,
+ IgnoreApplet = IgnoreApplet,
RememberWindowState = RememberWindowState,
EnableHardwareAcceleration = EnableHardwareAcceleration,
HideCursor = HideCursor,
@@ -817,6 +824,7 @@ namespace Ryujinx.UI.Common.Configuration
EnableDiscordIntegration.Value = true;
CheckUpdatesOnStart.Value = true;
ShowConfirmExit.Value = true;
+ IgnoreApplet.Value = false;
RememberWindowState.Value = true;
EnableHardwareAcceleration.Value = true;
HideCursor.Value = HideCursorMode.OnIdle;
@@ -1500,7 +1508,7 @@ namespace Ryujinx.UI.Common.Configuration
{
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 52.");
- configurationFileFormat.AutoloadDirs = new();
+ configurationFileFormat.AutoloadDirs = [];
configurationFileUpdated = true;
}
@@ -1523,6 +1531,15 @@ namespace Ryujinx.UI.Common.Configuration
configurationFileUpdated = true;
}
+ if (configurationFileFormat.Version < 55)
+ {
+ Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 55.");
+
+ configurationFileFormat.IgnoreApplet = false;
+
+ configurationFileUpdated = true;
+ }
+
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
Graphics.ResScale.Value = configurationFileFormat.ResScale;
Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom;
@@ -1553,6 +1570,7 @@ namespace Ryujinx.UI.Common.Configuration
EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration;
CheckUpdatesOnStart.Value = configurationFileFormat.CheckUpdatesOnStart;
ShowConfirmExit.Value = configurationFileFormat.ShowConfirmExit;
+ IgnoreApplet.Value = configurationFileFormat.IgnoreApplet;
RememberWindowState.Value = configurationFileFormat.RememberWindowState;
EnableHardwareAcceleration.Value = configurationFileFormat.EnableHardwareAcceleration;
HideCursor.Value = configurationFileFormat.HideCursor;
@@ -1585,7 +1603,7 @@ namespace Ryujinx.UI.Common.Configuration
UI.ColumnSort.SortColumnId.Value = configurationFileFormat.ColumnSort.SortColumnId;
UI.ColumnSort.SortAscending.Value = configurationFileFormat.ColumnSort.SortAscending;
UI.GameDirs.Value = configurationFileFormat.GameDirs;
- UI.AutoloadDirs.Value = configurationFileFormat.AutoloadDirs;
+ UI.AutoloadDirs.Value = configurationFileFormat.AutoloadDirs ?? [];
UI.ShownFileTypes.NSP.Value = configurationFileFormat.ShownFileTypes.NSP;
UI.ShownFileTypes.PFS0.Value = configurationFileFormat.ShownFileTypes.PFS0;
UI.ShownFileTypes.XCI.Value = configurationFileFormat.ShownFileTypes.XCI;
@@ -1611,12 +1629,7 @@ namespace Ryujinx.UI.Common.Configuration
Hid.EnableKeyboard.Value = configurationFileFormat.EnableKeyboard;
Hid.EnableMouse.Value = configurationFileFormat.EnableMouse;
Hid.Hotkeys.Value = configurationFileFormat.Hotkeys;
- Hid.InputConfig.Value = configurationFileFormat.InputConfig;
-
- if (Hid.InputConfig.Value == null)
- {
- Hid.InputConfig.Value = new List();
- }
+ Hid.InputConfig.Value = configurationFileFormat.InputConfig ?? [];
Multiplayer.LanInterfaceId.Value = configurationFileFormat.MultiplayerLanInterfaceId;
Multiplayer.Mode.Value = configurationFileFormat.MultiplayerMode;
diff --git a/src/Ryujinx.UI.Common/DiscordIntegrationModule.cs b/src/Ryujinx.UI.Common/DiscordIntegrationModule.cs
index 420c8c0f5..01781bab6 100644
--- a/src/Ryujinx.UI.Common/DiscordIntegrationModule.cs
+++ b/src/Ryujinx.UI.Common/DiscordIntegrationModule.cs
@@ -73,7 +73,7 @@ namespace Ryujinx.UI.Common
{
Assets = new Assets
{
- LargeImageKey = _discordGameAssetKeys.Contains(procRes.ProgramIdText.ToLower()) ? procRes.ProgramIdText : "game",
+ LargeImageKey = _discordGameAssetKeys.Contains(procRes.ProgramIdText) ? procRes.ProgramIdText : "game",
LargeImageText = TruncateToByteLength($"{appMeta.Title} | {procRes.DisplayVersion}"),
SmallImageKey = "ryujinx",
SmallImageText = TruncateToByteLength(_description)
@@ -131,9 +131,15 @@ namespace Ryujinx.UI.Common
"0100000000010000", // SUPER MARIO ODYSSEY
"010015100b514000", // Super Mario Bros. Wonder
"0100152000022000", // Mario Kart 8 Deluxe
+ "01006fe013472000", // Mario Party Superstars
+ "0100965017338000", // Super Mario Party Jamboree
"010049900f546000", // Super Mario 3D All-Stars
"010028600ebda000", // Super Mario 3D World + Bowser's Fury
"0100ecd018ebe000", // Paper Mario: The Thousand-Year Door
+ "010019401051c000", // Mario Strikers League
+ "0100ea80032ea000", // Super Mario Bros. U Deluxe
+ "0100bc0018138000", // Super Mario RPG
+ "0100bde00862a000", // Mario Tennis Aces
"010048701995e000", // Luigi's Mansion 2 HD
"0100dca0064a6000", // Luigi's Mansion 3
@@ -148,15 +154,24 @@ namespace Ryujinx.UI.Common
"0100d680194b2000", // Pikmin 2
"0100f4c009322000", // Pikmin 3 Deluxe
"0100b7c00933a000", // Pikmin 4
+
+ "01004ad014bf0000", // Sonic Frontiers
+ "01005ea01c0fc000", // SONIC X SHADOW GENERATIONS
+ "01005ea01c0fc001", // ^
+
+ "01004d300c5ae000", // Kirby and the Forgotten Land
+ "01006b601380e000", // Kirby's Return to Dreamland Deluxe
+ "01007e3006dda000", // Kirby Star Allies
"0100c2500fc20000", // Splatoon 3
"0100ba0018500000", // Splatoon 3: Splatfest World Premiere
"01000a10041ea000", // The Elder Scrolls V: Skyrim
"01007820196a6000", // Red Dead Redemption
+ "01008c8012920000", // Dying Light Platinum Edition
"0100744001588000", // Cars 3: Driven to Win
+ "0100c1f0051b6000", // Donkey Kong Country: Tropical Freeze
"01002b00111a2000", // Hyrule Warriors: Age of Calamity
"01006f8002326000", // Animal Crossing: New Horizons
- "01004d300c5ae000", // Kirby and the Forgotten Land
"0100853015e86000", // No Man's Sky
"01008d100d43e000", // Saints Row IV
"0100de600beee000", // Saints Row: The Third - The Full Package
diff --git a/src/Ryujinx.UI.Common/Helper/ConsoleHelper.cs b/src/Ryujinx.UI.Common/Helper/ConsoleHelper.cs
index 208ff5c9d..623952b37 100644
--- a/src/Ryujinx.UI.Common/Helper/ConsoleHelper.cs
+++ b/src/Ryujinx.UI.Common/Helper/ConsoleHelper.cs
@@ -27,9 +27,9 @@ namespace Ryujinx.UI.Common.Helper
const int SW_HIDE = 0;
const int SW_SHOW = 5;
- IntPtr hWnd = GetConsoleWindow();
+ nint hWnd = GetConsoleWindow();
- if (hWnd == IntPtr.Zero)
+ if (hWnd == nint.Zero)
{
Logger.Warning?.Print(LogClass.Application, "Attempted to show/hide console window but console window does not exist");
return;
@@ -40,11 +40,11 @@ namespace Ryujinx.UI.Common.Helper
[SupportedOSPlatform("windows")]
[LibraryImport("kernel32")]
- private static partial IntPtr GetConsoleWindow();
+ private static partial nint GetConsoleWindow();
[SupportedOSPlatform("windows")]
[LibraryImport("user32")]
[return: MarshalAs(UnmanagedType.Bool)]
- private static partial bool ShowWindow(IntPtr hWnd, int nCmdShow);
+ private static partial bool ShowWindow(nint hWnd, int nCmdShow);
}
}
diff --git a/src/Ryujinx.UI.Common/Helper/FileAssociationHelper.cs b/src/Ryujinx.UI.Common/Helper/FileAssociationHelper.cs
index a1ab356a7..b7631f48a 100644
--- a/src/Ryujinx.UI.Common/Helper/FileAssociationHelper.cs
+++ b/src/Ryujinx.UI.Common/Helper/FileAssociationHelper.cs
@@ -20,7 +20,7 @@ namespace Ryujinx.UI.Common.Helper
private const int SHCNF_FLUSH = 0x1000;
[LibraryImport("shell32.dll", SetLastError = true)]
- public static partial void SHChangeNotify(uint wEventId, uint uFlags, IntPtr dwItem1, IntPtr dwItem2);
+ public static partial void SHChangeNotify(uint wEventId, uint uFlags, nint dwItem1, nint dwItem2);
public static bool IsTypeAssociationSupported => (OperatingSystem.IsLinux() || OperatingSystem.IsWindows()) && !ReleaseInformation.IsFlatHubBuild;
@@ -143,7 +143,7 @@ namespace Ryujinx.UI.Common.Helper
}
// Notify Explorer the file association has been changed.
- SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_FLUSH, IntPtr.Zero, IntPtr.Zero);
+ SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_FLUSH, nint.Zero, nint.Zero);
return registered;
}
diff --git a/src/Ryujinx.UI.Common/Helper/ObjectiveC.cs b/src/Ryujinx.UI.Common/Helper/ObjectiveC.cs
index 6aba377a3..f8f972098 100644
--- a/src/Ryujinx.UI.Common/Helper/ObjectiveC.cs
+++ b/src/Ryujinx.UI.Common/Helper/ObjectiveC.cs
@@ -10,44 +10,44 @@ namespace Ryujinx.UI.Common.Helper
private const string ObjCRuntime = "/usr/lib/libobjc.A.dylib";
[LibraryImport(ObjCRuntime, StringMarshalling = StringMarshalling.Utf8)]
- private static partial IntPtr sel_getUid(string name);
+ private static partial nint sel_getUid(string name);
[LibraryImport(ObjCRuntime, StringMarshalling = StringMarshalling.Utf8)]
- private static partial IntPtr objc_getClass(string name);
+ private static partial nint objc_getClass(string name);
[LibraryImport(ObjCRuntime)]
- private static partial void objc_msgSend(IntPtr receiver, Selector selector);
+ private static partial void objc_msgSend(nint receiver, Selector selector);
[LibraryImport(ObjCRuntime)]
- private static partial void objc_msgSend(IntPtr receiver, Selector selector, byte value);
+ private static partial void objc_msgSend(nint receiver, Selector selector, byte value);
[LibraryImport(ObjCRuntime)]
- private static partial void objc_msgSend(IntPtr receiver, Selector selector, IntPtr value);
+ private static partial void objc_msgSend(nint receiver, Selector selector, nint value);
[LibraryImport(ObjCRuntime)]
- private static partial void objc_msgSend(IntPtr receiver, Selector selector, NSRect point);
+ private static partial void objc_msgSend(nint receiver, Selector selector, NSRect point);
[LibraryImport(ObjCRuntime)]
- private static partial void objc_msgSend(IntPtr receiver, Selector selector, double value);
+ private static partial void objc_msgSend(nint receiver, Selector selector, double value);
[LibraryImport(ObjCRuntime, EntryPoint = "objc_msgSend")]
- private static partial IntPtr IntPtr_objc_msgSend(IntPtr receiver, Selector selector);
+ private static partial nint nint_objc_msgSend(nint receiver, Selector selector);
[LibraryImport(ObjCRuntime, EntryPoint = "objc_msgSend")]
- private static partial IntPtr IntPtr_objc_msgSend(IntPtr receiver, Selector selector, IntPtr param);
+ private static partial nint nint_objc_msgSend(nint receiver, Selector selector, nint param);
[LibraryImport(ObjCRuntime, EntryPoint = "objc_msgSend", StringMarshalling = StringMarshalling.Utf8)]
- private static partial IntPtr IntPtr_objc_msgSend(IntPtr receiver, Selector selector, string param);
+ private static partial nint nint_objc_msgSend(nint receiver, Selector selector, string param);
[LibraryImport(ObjCRuntime, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.Bool)]
- private static partial bool bool_objc_msgSend(IntPtr receiver, Selector selector, IntPtr param);
+ private static partial bool bool_objc_msgSend(nint receiver, Selector selector, nint param);
public readonly struct Object
{
- public readonly IntPtr ObjPtr;
+ public readonly nint ObjPtr;
- private Object(IntPtr pointer)
+ private Object(nint pointer)
{
ObjPtr = pointer;
}
@@ -84,22 +84,22 @@ namespace Ryujinx.UI.Common.Helper
public Object GetFromMessage(Selector selector)
{
- return new Object(IntPtr_objc_msgSend(ObjPtr, selector));
+ return new Object(nint_objc_msgSend(ObjPtr, selector));
}
public Object GetFromMessage(Selector selector, Object obj)
{
- return new Object(IntPtr_objc_msgSend(ObjPtr, selector, obj.ObjPtr));
+ return new Object(nint_objc_msgSend(ObjPtr, selector, obj.ObjPtr));
}
public Object GetFromMessage(Selector selector, NSString nsString)
{
- return new Object(IntPtr_objc_msgSend(ObjPtr, selector, nsString.StrPtr));
+ return new Object(nint_objc_msgSend(ObjPtr, selector, nsString.StrPtr));
}
public Object GetFromMessage(Selector selector, string param)
{
- return new Object(IntPtr_objc_msgSend(ObjPtr, selector, param));
+ return new Object(nint_objc_msgSend(ObjPtr, selector, param));
}
public bool GetBoolFromMessage(Selector selector, Object obj)
@@ -110,7 +110,7 @@ namespace Ryujinx.UI.Common.Helper
public readonly struct Selector
{
- public readonly IntPtr SelPtr;
+ public readonly nint SelPtr;
private Selector(string name)
{
@@ -122,15 +122,15 @@ namespace Ryujinx.UI.Common.Helper
public readonly struct NSString
{
- public readonly IntPtr StrPtr;
+ public readonly nint StrPtr;
public NSString(string aString)
{
- IntPtr nsString = objc_getClass("NSString");
- StrPtr = IntPtr_objc_msgSend(nsString, "stringWithUTF8String:", aString);
+ nint nsString = objc_getClass("NSString");
+ StrPtr = nint_objc_msgSend(nsString, "stringWithUTF8String:", aString);
}
- public static implicit operator IntPtr(NSString nsString) => nsString.StrPtr;
+ public static implicit operator nint(NSString nsString) => nsString.StrPtr;
}
public readonly struct NSPoint
diff --git a/src/Ryujinx.UI.Common/Helper/OpenHelper.cs b/src/Ryujinx.UI.Common/Helper/OpenHelper.cs
index af6170afe..8b0e1f1fd 100644
--- a/src/Ryujinx.UI.Common/Helper/OpenHelper.cs
+++ b/src/Ryujinx.UI.Common/Helper/OpenHelper.cs
@@ -9,13 +9,13 @@ namespace Ryujinx.UI.Common.Helper
public static partial class OpenHelper
{
[LibraryImport("shell32.dll", SetLastError = true)]
- private static partial int SHOpenFolderAndSelectItems(IntPtr pidlFolder, uint cidl, IntPtr apidl, uint dwFlags);
+ private static partial int SHOpenFolderAndSelectItems(nint pidlFolder, uint cidl, nint apidl, uint dwFlags);
[LibraryImport("shell32.dll", SetLastError = true)]
- private static partial void ILFree(IntPtr pidlList);
+ private static partial void ILFree(nint pidlList);
[LibraryImport("shell32.dll", SetLastError = true)]
- private static partial IntPtr ILCreateFromPathW([MarshalAs(UnmanagedType.LPWStr)] string pszPath);
+ private static partial nint ILCreateFromPathW([MarshalAs(UnmanagedType.LPWStr)] string pszPath);
public static void OpenFolder(string path)
{
@@ -40,12 +40,12 @@ namespace Ryujinx.UI.Common.Helper
{
if (OperatingSystem.IsWindows())
{
- IntPtr pidlList = ILCreateFromPathW(path);
- if (pidlList != IntPtr.Zero)
+ nint pidlList = ILCreateFromPathW(path);
+ if (pidlList != nint.Zero)
{
try
{
- Marshal.ThrowExceptionForHR(SHOpenFolderAndSelectItems(pidlList, 0, IntPtr.Zero, 0));
+ Marshal.ThrowExceptionForHR(SHOpenFolderAndSelectItems(pidlList, 0, nint.Zero, 0));
}
finally
{
diff --git a/src/Ryujinx.UI.Common/SystemInfo/MacOSSystemInfo.cs b/src/Ryujinx.UI.Common/SystemInfo/MacOSSystemInfo.cs
index 36deaf35f..894c3cadc 100644
--- a/src/Ryujinx.UI.Common/SystemInfo/MacOSSystemInfo.cs
+++ b/src/Ryujinx.UI.Common/SystemInfo/MacOSSystemInfo.cs
@@ -68,11 +68,11 @@ namespace Ryujinx.UI.Common.SystemInfo
private const string SystemLibraryName = "libSystem.dylib";
[LibraryImport(SystemLibraryName, SetLastError = true)]
- private static partial int sysctlbyname([MarshalAs(UnmanagedType.LPStr)] string name, IntPtr oldValue, ref ulong oldSize, IntPtr newValue, ulong newValueSize);
+ private static partial int sysctlbyname([MarshalAs(UnmanagedType.LPStr)] string name, nint oldValue, ref ulong oldSize, nint newValue, ulong newValueSize);
- private static int SysctlByName(string name, IntPtr oldValue, ref ulong oldSize)
+ private static int SysctlByName(string name, nint oldValue, ref ulong oldSize)
{
- if (sysctlbyname(name, oldValue, ref oldSize, IntPtr.Zero, 0) == -1)
+ if (sysctlbyname(name, oldValue, ref oldSize, nint.Zero, 0) == -1)
{
int err = Marshal.GetLastWin32Error();
@@ -90,7 +90,7 @@ namespace Ryujinx.UI.Common.SystemInfo
{
ulong oldValueSize = (ulong)Unsafe.SizeOf();
- return SysctlByName(name, (IntPtr)Unsafe.AsPointer(ref oldValue), ref oldValueSize);
+ return SysctlByName(name, (nint)Unsafe.AsPointer(ref oldValue), ref oldValueSize);
}
}
@@ -100,7 +100,7 @@ namespace Ryujinx.UI.Common.SystemInfo
ulong strSize = 0;
- int res = SysctlByName(name, IntPtr.Zero, ref strSize);
+ int res = SysctlByName(name, nint.Zero, ref strSize);
if (res == 0)
{
@@ -110,7 +110,7 @@ namespace Ryujinx.UI.Common.SystemInfo
{
fixed (byte* rawDataPtr = rawData)
{
- res = SysctlByName(name, (IntPtr)rawDataPtr, ref strSize);
+ res = SysctlByName(name, (nint)rawDataPtr, ref strSize);
}
if (res == 0)
diff --git a/src/Ryujinx/App.axaml b/src/Ryujinx/App.axaml
index eab318b7b..5a603509c 100644
--- a/src/Ryujinx/App.axaml
+++ b/src/Ryujinx/App.axaml
@@ -12,6 +12,6 @@
-
+
-
\ No newline at end of file
+
diff --git a/src/Ryujinx/App.axaml.cs b/src/Ryujinx/App.axaml.cs
index c834004e2..295ac1503 100644
--- a/src/Ryujinx/App.axaml.cs
+++ b/src/Ryujinx/App.axaml.cs
@@ -66,11 +66,6 @@ namespace Ryujinx.Ava
}
}
- private void CustomThemeChanged_Event(object sender, ReactiveEventArgs e)
- {
- ApplyConfiguredTheme();
- }
-
private void ShowRestartDialog()
{
_ = Dispatcher.UIThread.InvokeAsync(async () =>
@@ -93,11 +88,10 @@ namespace Ryujinx.Ava
}
});
}
+
+ private void CustomThemeChanged_Event(object _, ReactiveEventArgs __) => ApplyConfiguredTheme();
- private void ThemeChanged_Event(object sender, ReactiveEventArgs e)
- {
- ApplyConfiguredTheme();
- }
+ private void ThemeChanged_Event(object _, ReactiveEventArgs __) => ApplyConfiguredTheme();
public void ApplyConfiguredTheme()
{
@@ -112,13 +106,11 @@ namespace Ryujinx.Ava
baseStyle = ConfigurationState.Instance.UI.BaseStyle;
}
- ThemeVariant systemTheme = DetectSystemTheme();
-
ThemeManager.OnThemeChanged();
RequestedThemeVariant = baseStyle switch
{
- "Auto" => systemTheme,
+ "Auto" => DetectSystemTheme(),
"Light" => ThemeVariant.Light,
"Dark" => ThemeVariant.Dark,
_ => ThemeVariant.Default,
diff --git a/src/Ryujinx/AppHost.cs b/src/Ryujinx/AppHost.cs
index eafcbb13a..e2cede1c4 100644
--- a/src/Ryujinx/AppHost.cs
+++ b/src/Ryujinx/AppHost.cs
@@ -57,7 +57,6 @@ using Key = Ryujinx.Input.Key;
using MouseButton = Ryujinx.Input.MouseButton;
using ScalingFilter = Ryujinx.Common.Configuration.ScalingFilter;
using Size = Avalonia.Size;
-using Switch = Ryujinx.HLE.Switch;
namespace Ryujinx.Ava
{
@@ -69,8 +68,8 @@ namespace Ryujinx.Ava
private const float VolumeDelta = 0.05f;
private static readonly Cursor _invisibleCursor = new(StandardCursorType.None);
- private readonly IntPtr _invisibleCursorWin;
- private readonly IntPtr _defaultCursorWin;
+ private readonly nint _invisibleCursorWin;
+ private readonly nint _defaultCursorWin;
private readonly long _ticksPerFrame;
private readonly Stopwatch _chrono;
@@ -103,6 +102,10 @@ namespace Ryujinx.Ava
private CursorStates _cursorState = !ConfigurationState.Instance.Hid.EnableMouse.Value ?
CursorStates.CursorIsVisible : CursorStates.CursorIsHidden;
+ private DateTime _lastShaderReset;
+ private uint _displayCount;
+ private uint _previousCount = 0;
+
private bool _isStopped;
private bool _isActive;
private bool _renderingStarted;
@@ -120,14 +123,13 @@ namespace Ryujinx.Ava
private readonly object _lockObject = new();
public event EventHandler AppExit;
- public event EventHandler StatusInitEvent;
public event EventHandler StatusUpdatedEvent;
public VirtualFileSystem VirtualFileSystem { get; }
public ContentManager ContentManager { get; }
public NpadManager NpadManager { get; }
public TouchScreenManager TouchScreenManager { get; }
- public Switch Device { get; set; }
+ public HLE.Switch Device { get; set; }
public int Width { get; private set; }
public int Height { get; private set; }
@@ -511,8 +513,7 @@ namespace Ryujinx.Ava
}
_isStopped = true;
- _isActive = false;
- DiscordIntegrationModule.SwitchToMainState();
+ Stop();
}
public void DisposeContext()
@@ -847,7 +848,7 @@ namespace Ryujinx.Ava
// Initialize Configuration.
var memoryConfiguration = ConfigurationState.Instance.System.DramSize.Value;
- Device = new Switch(new HLEConfiguration(
+ Device = new HLE.Switch(new HLEConfiguration(
VirtualFileSystem,
_viewModel.LibHacHorizonManager,
ContentManager,
@@ -1043,14 +1044,14 @@ namespace Ryujinx.Ava
public void InitStatus()
{
- StatusInitEvent?.Invoke(this, new StatusInitEventArgs(
- ConfigurationState.Instance.Graphics.GraphicsBackend.Value switch
- {
- GraphicsBackend.Vulkan => "Vulkan",
- GraphicsBackend.OpenGl => "OpenGL",
- _ => throw new NotImplementedException()
- },
- $"GPU: {_renderer.GetHardwareInfo().GpuDriver}"));
+ _viewModel.BackendText = ConfigurationState.Instance.Graphics.GraphicsBackend.Value switch
+ {
+ GraphicsBackend.Vulkan => "Vulkan",
+ GraphicsBackend.OpenGl => "OpenGL",
+ _ => throw new NotImplementedException()
+ };
+
+ _viewModel.GpuNameText = $"GPU: {_renderer.GetHardwareInfo().GpuDriver}";
}
public void UpdateStatus()
@@ -1058,6 +1059,8 @@ namespace Ryujinx.Ava
// Run a status update only when a frame is to be drawn. This prevents from updating the ui and wasting a render when no frame is queued.
string dockedMode = ConfigurationState.Instance.System.EnableDockedMode ? LocaleManager.Instance[LocaleKeys.Docked] : LocaleManager.Instance[LocaleKeys.Handheld];
+ UpdateShaderCount();
+
if (GraphicsConfig.ResScale != 1)
{
dockedMode += $" ({GraphicsConfig.ResScale}x)";
@@ -1069,7 +1072,8 @@ namespace Ryujinx.Ava
dockedMode,
ConfigurationState.Instance.Graphics.AspectRatio.Value.ToText(),
LocaleManager.Instance[LocaleKeys.Game] + $": {Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)",
- $"FIFO: {Device.Statistics.GetFifoPercent():00.00} %"));
+ $"FIFO: {Device.Statistics.GetFifoPercent():00.00} %",
+ _displayCount));
}
public async Task ShowExitPrompt()
@@ -1095,6 +1099,24 @@ namespace Ryujinx.Ava
}
}
+ private void UpdateShaderCount()
+ {
+ // If there is a mismatch between total program compile and previous count
+ // this means new shaders have been compiled and should be displayed.
+ if (_renderer.ProgramCount != _previousCount)
+ {
+ _displayCount += _renderer.ProgramCount - _previousCount;
+ _lastShaderReset = DateTime.Now;
+ _previousCount = _renderer.ProgramCount;
+ }
+ // Check if 5s has passed since any new shaders were compiled.
+ // If yes, reset the counter.
+ else if (_lastShaderReset.AddSeconds(5) <= DateTime.Now)
+ {
+ _displayCount = 0;
+ }
+ }
+
private bool UpdateFrame()
{
if (!_isActive)
diff --git a/src/Ryujinx/Assets/Locales/ar_SA.json b/src/Ryujinx/Assets/Locales/ar_SA.json
index ed06778cb..f0dfe40b8 100644
--- a/src/Ryujinx/Assets/Locales/ar_SA.json
+++ b/src/Ryujinx/Assets/Locales/ar_SA.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "تجاهل الخدمات المفقودة",
+ "SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "الرسومات",
"SettingsTabGraphicsAPI": "API الرسومات ",
"SettingsTabGraphicsEnableShaderCache": "تفعيل ذاكرة المظللات المؤقتة",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "استخدم هايبرڤايزور بدلا من JIT. يعمل على تحسين الأداء بشكل كبير عند توفره، ولكنه قد يكون غير مستقر في حالته الحالية.",
"DRamTooltip": "يستخدم تخطيط وضع الذاكرة البديل لتقليد نموذج سويتش المطورين.\n\nيعد هذا مفيدا فقط لحزم النسيج عالية الدقة أو تعديلات دقة 4K. لا يحسن الأداء.\n\nاتركه معطلا إذا لم تكن متأكدا.",
"IgnoreMissingServicesTooltip": "يتجاهل خدمات نظام هوريزون غير المنفذة. قد يساعد هذا في تجاوز الأعطال عند تشغيل ألعاب معينة.\n\nاتركه معطلا إذا كنت غير متأكد.",
+ "IgnoreAppletTooltip": "لن يظهر مربع الحوار الخارجي \"تطبيق وحدة التحكم\" إذا تم فصل لوحة الألعاب أثناء اللعب. ولن تظهر مطالبة بإغلاق مربع الحوار أو إعداد وحدة تحكم جديدة. وبمجرد إعادة توصيل وحدة التحكم التي تم فصلها سابقًا، ستستأنف اللعبة تلقائيًا.",
"GraphicsBackendThreadingTooltip": "ينفذ أوامر الواجهة الخلفية للرسومات على مسار ثاني.\n\nيعمل على تسريع عملية تجميع المظللات وتقليل التقطيع وتحسين الأداء على برامج تشغيل وحدة الرسوميات دون دعم المسارات المتعددة الخاصة بهم. أداء أفضل قليلا على برامج التشغيل ذات المسارات المتعددة.\n\nاضبط على تلقائي إذا لم تكن متأكدا.",
"GalThreadingTooltip": "ينفذ أوامر الواجهة الخلفية للرسومات على مسار ثاني.\n\nيعمل على تسريع عملية تجميع المظللات وتقليل التقطيع وتحسين الأداء على برامج تشغيل وحدة الرسوميات دون دعم المسارات المتعددة الخاصة بهم. أداء أفضل قليلا على برامج التشغيل ذات المسارات المتعددة.\n\nاضبط على تلقائي إذا لم تكن متأكدا.",
"ShaderCacheToggleTooltip": "يحفظ ذاكرة المظللات المؤقتة على القرص مما يقلل من التقطيع في عمليات التشغيل اللاحقة.\n\nاتركه مفعلا إذا لم تكن متأكدا.",
diff --git a/src/Ryujinx/Assets/Locales/de_DE.json b/src/Ryujinx/Assets/Locales/de_DE.json
index b78e3ded8..dbda1755b 100644
--- a/src/Ryujinx/Assets/Locales/de_DE.json
+++ b/src/Ryujinx/Assets/Locales/de_DE.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignoriere fehlende Dienste",
+ "SettingsTabSystemIgnoreApplet": "Applet ignorieren",
"SettingsTabGraphics": "Grafik",
"SettingsTabGraphicsAPI": "Grafik-API",
"SettingsTabGraphicsEnableShaderCache": "Shader-Cache aktivieren",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "Verwende Hypervisor anstelle von JIT. Verbessert die Leistung stark, falls vorhanden, kann jedoch in seinem aktuellen Zustand instabil sein.",
"DRamTooltip": "Erhöht den Arbeitsspeicher des emulierten Systems von 4 GiB auf 6 GiB.\n\nDies ist nur für Texturenpakete mit höherer Auflösung oder Mods mit 4K-Auflösung nützlich. Diese Option verbessert NICHT die Leistung.\n\nIm Zweifelsfall AUS lassen.",
"IgnoreMissingServicesTooltip": "Durch diese Option werden nicht implementierte Dienste der Switch-Firmware ignoriert. Dies kann dabei helfen, Abstürze beim Starten bestimmter Spiele zu umgehen.\n\nIm Zweifelsfall AUS lassen.",
+ "IgnoreAppletTooltip": "Der externe Dialog \"Controller-Applet\" wird nicht angezeigt, wenn das Gamepad während des Spiels getrennt wird. Es erfolgt keine Aufforderung, den Dialog zu schließen oder einen neuen Controller einzurichten. Sobald der zuvor getrennte Controller wieder angeschlossen wird, wird das Spiel automatisch fortgesetzt.",
"GraphicsBackendThreadingTooltip": "Führt Grafik-Backend Befehle auf einem zweiten Thread aus.\n\nDies beschleunigt die Shader-Kompilierung, reduziert Stottern und verbessert die Leistung auf GPU-Treibern ohne eigene Multithreading-Unterstützung. Geringfügig bessere Leistung bei Treibern mit Multithreading.\n\nIm Zweifelsfall auf AUTO stellen.",
"GalThreadingTooltip": "Führt Grafik-Backend Befehle auf einem zweiten Thread aus.\n\nDies Beschleunigt die Shader-Kompilierung, reduziert Stottern und verbessert die Leistung auf GPU-Treibern ohne eigene Multithreading-Unterstützung. Geringfügig bessere Leistung bei Treibern mit Multithreading.\n\nIm Zweifelsfall auf auf AUTO stellen.",
"ShaderCacheToggleTooltip": "Speichert einen persistenten Shader Cache, der das Stottern bei nachfolgenden Durchläufen reduziert.\n\nIm Zweifelsfall AN lassen.",
diff --git a/src/Ryujinx/Assets/Locales/el_GR.json b/src/Ryujinx/Assets/Locales/el_GR.json
index 7a6e5619d..c42a73726 100644
--- a/src/Ryujinx/Assets/Locales/el_GR.json
+++ b/src/Ryujinx/Assets/Locales/el_GR.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Αγνόηση υπηρεσιών που λείπουν",
+ "SettingsTabSystemIgnoreApplet": "Αγνοήστε το Applet",
"SettingsTabGraphics": "Γραφικά",
"SettingsTabGraphicsAPI": "API Γραφικά",
"SettingsTabGraphicsEnableShaderCache": "Ενεργοποίηση Προσωρινής Μνήμης Shader",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "Χρησιμοποιήστε Hypervisor αντί για JIT. Βελτιώνει σημαντικά την απόδοση όταν διατίθεται, αλλά μπορεί να είναι ασταθής στην τρέχουσα κατάστασή του.",
"DRamTooltip": "Επεκτείνει την ποσότητα της μνήμης στο εξομοιούμενο σύστημα από 4 GiB σε 6 GiB",
"IgnoreMissingServicesTooltip": "Ενεργοποίηση ή απενεργοποίηση της αγνοώησης για υπηρεσίες που λείπουν",
+ "IgnoreAppletTooltip": "Το εξωτερικό παράθυρο διαλόγου \"Ελεγκτής μικροεφαρμογής\" δεν θα εμφανιστεί εάν το gamepad αποσυνδεθεί κατά τη διάρκεια του παιχνιδιού. Δεν θα σας ζητηθεί να κλείσετε το παράθυρο διαλόγου ή να ρυθμίσετε έναν νέο ελεγκτή. Μόλις επανασυνδεθεί το χειριστήριο που είχε αποσυνδεθεί προηγουμένως, το παιχνίδι θα συνεχιστεί αυτόματα.",
"GraphicsBackendThreadingTooltip": "Ενεργοποίηση Πολυνηματικής Επεξεργασίας Γραφικών",
"GalThreadingTooltip": "Εκτελεί εντολές γραφικών σε ένα δεύτερο νήμα. Επιτρέπει την πολυνηματική μεταγλώττιση Shader σε χρόνο εκτέλεσης, μειώνει το τρεμόπαιγμα και βελτιώνει την απόδοση των προγραμμάτων οδήγησης χωρίς τη δική τους υποστήριξη πολλαπλών νημάτων. Ποικίλες κορυφαίες επιδόσεις σε προγράμματα οδήγησης με multithreading. Μπορεί να χρειαστεί επανεκκίνηση του Ryujinx για να απενεργοποιήσετε σωστά την ενσωματωμένη λειτουργία πολλαπλών νημάτων του προγράμματος οδήγησης ή ίσως χρειαστεί να το κάνετε χειροκίνητα για να έχετε την καλύτερη απόδοση.",
"ShaderCacheToggleTooltip": "Ενεργοποιεί ή απενεργοποιεί την Προσωρινή Μνήμη Shader",
diff --git a/src/Ryujinx/Assets/Locales/en_US.json b/src/Ryujinx/Assets/Locales/en_US.json
index 012a800c4..ad316497b 100644
--- a/src/Ryujinx/Assets/Locales/en_US.json
+++ b/src/Ryujinx/Assets/Locales/en_US.json
@@ -109,6 +109,7 @@
"SettingsTabGeneralHideCursorAlways": "Always",
"SettingsTabGeneralGameDirectories": "Game Directories",
"SettingsTabGeneralAutoloadDirectories": "Autoload DLC/Updates Directories",
+ "SettingsTabGeneralAutoloadNote": "DLC and Updates which refer to missing files will be unloaded automatically",
"SettingsTabGeneralAdd": "Add",
"SettingsTabGeneralRemove": "Remove",
"SettingsTabSystem": "System",
@@ -158,6 +159,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignore Missing Services",
+ "SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "Graphics",
"SettingsTabGraphicsAPI": "Graphics API",
"SettingsTabGraphicsEnableShaderCache": "Enable Shader Cache",
@@ -592,6 +594,7 @@
"UseHypervisorTooltip": "Use Hypervisor instead of JIT. Greatly improves performance when available, but can be unstable in its current state.",
"DRamTooltip": "Utilizes an alternative memory mode with 8GiB of DRAM to mimic a Switch development model.\n\nThis is only useful for higher-resolution texture packs or 4k resolution mods. Does NOT improve performance.\n\nLeave OFF if unsure.",
"IgnoreMissingServicesTooltip": "Ignores unimplemented Horizon OS services. This may help in bypassing crashes when booting certain games.\n\nLeave OFF if unsure.",
+ "IgnoreAppletTooltip": "The external dialog \"Controller Applet\" will not appear if the gamepad is disconnected during gameplay. There will be no prompt to close the dialog or set up a new controller. Once the previously disconnected controller is reconnected, the game will automatically resume.",
"GraphicsBackendThreadingTooltip": "Executes graphics backend commands on a second thread.\n\nSpeeds up shader compilation, reduces stuttering, and improves performance on GPU drivers without multithreading support of their own. Slightly better performance on drivers with multithreading.\n\nSet to AUTO if unsure.",
"GalThreadingTooltip": "Executes graphics backend commands on a second thread.\n\nSpeeds up shader compilation, reduces stuttering, and improves performance on GPU drivers without multithreading support of their own. Slightly better performance on drivers with multithreading.\n\nSet to AUTO if unsure.",
"ShaderCacheToggleTooltip": "Saves a disk shader cache which reduces stuttering in subsequent runs.\n\nLeave ON if unsure.",
@@ -744,8 +747,9 @@
"DlcWindowHeading": "{0} Downloadable Content(s)",
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
+ "AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
"AutoloadUpdateAddedMessage": "{0} new update(s) added",
- "AutoloadDlcAndUpdateAddedMessage": "{0} new downloadable content(s) and {1} new update(s) added",
+ "AutoloadUpdateRemovedMessage": "{0} missing update(s) removed",
"ModWindowHeading": "{0} Mod(s)",
"UserProfilesEditProfile": "Edit Selected",
"Continue": "Continue",
diff --git a/src/Ryujinx/Assets/Locales/es_ES.json b/src/Ryujinx/Assets/Locales/es_ES.json
index 55311d7fd..d3050f979 100644
--- a/src/Ryujinx/Assets/Locales/es_ES.json
+++ b/src/Ryujinx/Assets/Locales/es_ES.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignorar servicios no implementados",
+ "SettingsTabSystemIgnoreApplet": "Ignorar el Applet",
"SettingsTabGraphics": "Gráficos",
"SettingsTabGraphicsAPI": "API de gráficos",
"SettingsTabGraphicsEnableShaderCache": "Habilitar caché de sombreadores",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "Usar Hypervisor en lugar de JIT. Mejora enormemente el rendimiento cuando está disponible, pero puede ser inestable en su estado actual.",
"DRamTooltip": "Expande la memoria DRAM del sistema emulado de 4GiB a 6GiB.\n\nUtilizar solo con packs de texturas HD o mods de resolución 4K. NO mejora el rendimiento.\n\nDesactívalo si no sabes qué hacer.",
"IgnoreMissingServicesTooltip": "Hack para ignorar servicios no implementados del Horizon OS. Esto puede ayudar a sobrepasar crasheos cuando inicies ciertos juegos.\n\nDesactívalo si no sabes qué hacer.",
+ "IgnoreAppletTooltip": "El cuadro de diálogo externo \"Applet del controlador\" no aparecerá si el gamepad se desconecta durante el juego. No aparecerá ningún mensaje para cerrar el cuadro de diálogo o configurar un nuevo controlador. Una vez que se vuelva a conectar el controlador que se había desconectado anteriormente, el juego se reanudará automáticamente.",
"GraphicsBackendThreadingTooltip": "Ejecuta los comandos del motor gráfico en un segundo hilo. Acelera la compilación de sombreadores, reduce los tirones, y mejora el rendimiento en controladores gráficos que no realicen su propio procesamiento con múltiples hilos. Rendimiento ligeramente superior en controladores gráficos que soporten múltiples hilos.\n\nSelecciona \"Auto\" si no sabes qué hacer.",
"GalThreadingTooltip": "Ejecuta los comandos del motor gráfico en un segundo hilo. Acelera la compilación de sombreadores, reduce los tirones, y mejora el rendimiento en controladores gráficos que no realicen su propio procesamiento con múltiples hilos. Rendimiento ligeramente superior en controladores gráficos que soporten múltiples hilos.\n\nSelecciona \"Auto\" si no sabes qué hacer.",
"ShaderCacheToggleTooltip": "Guarda una caché de sombreadores en disco, la cual reduce los tirones a medida que vas jugando.\n\nActívalo si no sabes qué hacer.",
diff --git a/src/Ryujinx/Assets/Locales/fr_FR.json b/src/Ryujinx/Assets/Locales/fr_FR.json
index 6d6174f40..e90aa6cec 100644
--- a/src/Ryujinx/Assets/Locales/fr_FR.json
+++ b/src/Ryujinx/Assets/Locales/fr_FR.json
@@ -106,6 +106,7 @@
"SettingsTabGeneralHideCursorAlways": "Toujours",
"SettingsTabGeneralGameDirectories": "Dossiers des jeux",
"SettingsTabGeneralAutoloadDirectories": "Dossiers des mises à jour/DLC",
+ "SettingsTabGeneralAutoloadNote": "Les DLC et les mises à jour faisant référence aux fichiers manquants seront automatiquement déchargés.",
"SettingsTabGeneralAdd": "Ajouter",
"SettingsTabGeneralRemove": "Retirer",
"SettingsTabSystem": "Système",
@@ -155,6 +156,7 @@
"SettingsTabSystemDramSize8GiB": "8GiO",
"SettingsTabSystemDramSize12GiB": "12GiO",
"SettingsTabSystemIgnoreMissingServices": "Ignorer les services manquants",
+ "SettingsTabSystemIgnoreApplet": "Ignorer l'applet",
"SettingsTabGraphics": "Graphismes",
"SettingsTabGraphicsAPI": "API Graphique",
"SettingsTabGraphicsEnableShaderCache": "Activer le cache des shaders",
@@ -589,6 +591,7 @@
"UseHypervisorTooltip": "Utiliser l'Hyperviseur au lieu du JIT. Améliore considérablement les performances lorsqu'il est disponible, mais peut être instable dans son état actuel.",
"DRamTooltip": "Utilise une disposition alternative de la mémoire avec 8GiO de DRAM pour imiter le kit de développeur de la Switch.\n\nActivez cette option pour les packs de textures 4k ou les mods à résolution 4k.\nN'améliore pas les performances.\n\nLaissez désactivé en cas d'incertitude.",
"IgnoreMissingServicesTooltip": "Ignore les services Horizon OS non-intégré. Cela peut aider à contourner les plantages lors du démarrage de certains jeux.\n\nActivez-le en cas d'incertitude.",
+ "IgnoreAppletTooltip": "La boîte de dialogue externe \"Applet du contrôleur\" n'apparaîtra pas si la manette est déconnectée pendant le jeu. Il n'y aura aucune invite pour fermer la boîte de dialogue ou configurer un nouveau contrôleur. Une fois que le contrôleur précédemment déconnecté est reconnecté, le jeu reprendra automatiquement.",
"GraphicsBackendThreadingTooltip": "Exécute des commandes du backend graphiques sur un second thread.\n\nAccélère la compilation des shaders, réduit les crashs et les lags, améliore les performances sur les pilotes GPU sans support de multithreading. Légère augementation des performances sur les pilotes avec multithreading intégrer.\n\nRéglez sur Auto en cas d'incertitude.",
"GalThreadingTooltip": "Exécute des commandes du backend graphiques sur un second thread.\n\nAccélère la compilation des shaders, réduit les crashs et les lags, améliore les performances sur les pilotes GPU sans support de multithreading. Légère augementation des performances sur les pilotes avec multithreading intégrer.\n\nRéglez sur Auto en cas d'incertitude.",
"ShaderCacheToggleTooltip": "Enregistre un cache de shaders sur le disque dur, réduit le lag lors de multiples exécutions.\n\nLaissez activé si vous n'êtes pas sûr.",
@@ -731,8 +734,9 @@
"DlcWindowHeading": "{0} Contenu(s) téléchargeable(s)",
"DlcWindowDlcAddedMessage": "{0} nouveau(x) contenu(s) téléchargeable(s) ajouté(s)",
"AutoloadDlcAddedMessage": "{0} nouveau(x) contenu(s) téléchargeable(s) ajouté(s)",
+ "AutoloadDlcRemovedMessage": "{0} contenu(s) téléchargeable(s) manquant(s) supprimé(s)",
"AutoloadUpdateAddedMessage": "{0} nouvelle(s) mise(s) à jour ajoutée(s)",
- "AutoloadDlcAndUpdateAddedMessage": "{0} nouveau(x) contenu(s) téléchargeable(s) et {1} nouvelle(s) mise(s) à jour ajouté(s)",
+ "AutoloadUpdateRemovedMessage": "{0} mises à jour manquantes supprimées",
"ModWindowHeading": "{0} Mod(s)",
"UserProfilesEditProfile": "Éditer la sélection",
"Cancel": "Annuler",
diff --git a/src/Ryujinx/Assets/Locales/he_IL.json b/src/Ryujinx/Assets/Locales/he_IL.json
index 129ef72ac..1bf6f3154 100644
--- a/src/Ryujinx/Assets/Locales/he_IL.json
+++ b/src/Ryujinx/Assets/Locales/he_IL.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "התעלם משירותים חסרים",
+ "SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "גרפיקה",
"SettingsTabGraphicsAPI": "ממשק גראפי",
"SettingsTabGraphicsEnableShaderCache": "הפעל מטמון הצללות",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "השתמש ב- Hypervisor במקום JIT. משפר מאוד ביצועים כשניתן, אבל יכול להיות לא יציב במצבו הנוכחי.",
"DRamTooltip": "מנצל תצורת מצב-זיכרון חלופית לחכות את מכשיר הפיתוח של הסוויץ'.\n\nזה שימושי להחלפת חבילות מרקמים באיכותיים יותר או כאלו ברזולוציית 4k. לא משפר ביצועים.\n\nמוטב להשאיר כבוי אם לא בטוחים.",
"IgnoreMissingServicesTooltip": "מתעלם מפעולות שלא קיבלו מימוש במערכת ההפעלה Horizon OS. זה עלול לעזור לעקוף קריסות של היישום במשחקים מסויימים.\n\nמוטב להשאיר כבוי אם לא בטוחים.",
+ "IgnoreAppletTooltip": "תיבת הדו-שיח החיצונית \"Controller Applet\" לא תופיע אם ה-Gamepad מנותק במהלך המשחק. לא תהיה הנחיה לסגור את תיבת הדו-שיח או להגדיר בקר חדש. ברגע שהבקר שנותק בעבר יתחבר מחדש, המשחק יתחדש אוטומטית.",
"GraphicsBackendThreadingTooltip": "מריץ פקודות גראפיקה בתהליך שני נפרד.\n\nמאיץ עיבוד הצללות, מפחית תקיעות ומשפר ביצועים של דרייבר כרטיסי מסך אשר לא תומכים בהרצה רב-תהליכית.\n\nמוטב להשאיר על אוטומטי אם לא בטוחים.",
"GalThreadingTooltip": "מריץ פקודות גראפיקה בתהליך שני נפרד.\n\nמאיץ עיבוד הצללות, מפחית תקיעות ומשפר ביצועים של דרייבר כרטיסי מסך אשר לא תומכים בהרצה רב-תהליכית.\n\nמוטב להשאיר על אוטומטי אם לא בטוחים.",
"ShaderCacheToggleTooltip": "שומר זכרון מטמון של הצללות, דבר שמפחית תקיעות בריצות מסוימות.\n\nמוטב להשאיר דלוק אם לא בטוחים.",
diff --git a/src/Ryujinx/Assets/Locales/it_IT.json b/src/Ryujinx/Assets/Locales/it_IT.json
index 94fe67d78..07169c3e3 100644
--- a/src/Ryujinx/Assets/Locales/it_IT.json
+++ b/src/Ryujinx/Assets/Locales/it_IT.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignora servizi mancanti",
+ "SettingsTabSystemIgnoreApplet": "Ignora l'applet",
"SettingsTabGraphics": "Grafica",
"SettingsTabGraphicsAPI": "API grafica",
"SettingsTabGraphicsEnableShaderCache": "Attiva la cache degli shader",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "Usa Hypervisor invece di JIT. Migliora notevolmente le prestazioni quando disponibile, ma può essere instabile nel suo stato attuale.",
"DRamTooltip": "Utilizza un layout di memoria alternativo per imitare un'unità di sviluppo di Switch.\n\nQuesta opzione è utile soltanto per i pacchetti di texture ad alta risoluzione o per le mod che aumentano la risoluzione a 4K. NON migliora le prestazioni.\n\nNel dubbio, lascia l'opzione disattivata.",
"IgnoreMissingServicesTooltip": "Ignora i servizi non implementati del sistema operativo Horizon. Può aiutare ad aggirare gli arresti anomali che si verificano avviando alcuni giochi.\n\nNel dubbio, lascia l'opzione disattivata.",
+ "IgnoreAppletTooltip": "La finestra di dialogo esterna \"Controller Applet\" non apparirà se il gamepad viene disconnesso durante il gioco. Non ci sarà alcun prompt per chiudere la finestra di dialogo o impostare un nuovo controller. Una volta che il controller disconnesso in precedenza viene ricollegato, il gioco riprenderà automaticamente.",
"GraphicsBackendThreadingTooltip": "Esegue i comandi del backend grafico su un secondo thread.\n\nVelocizza la compilazione degli shader, riduce lo stuttering e migliora le prestazioni sui driver grafici senza il supporto integrato al multithreading. Migliora leggermente le prestazioni sui driver che supportano il multithreading.\n\nNel dubbio, imposta l'opzione su Auto.",
"GalThreadingTooltip": "Esegue i comandi del backend grafico su un secondo thread.\n\nVelocizza la compilazione degli shader, riduce lo stuttering e migliora le prestazioni sui driver grafici senza il supporto integrato al multithreading. Migliora leggermente le prestazioni sui driver che supportano il multithreading.\n\nNel dubbio, imposta l'opzione su Auto.",
"ShaderCacheToggleTooltip": "Salva una cache degli shader su disco che riduce i fenomeni di stuttering nelle esecuzioni successive.\n\nNel dubbio, lascia l'opzione attiva.",
diff --git a/src/Ryujinx/Assets/Locales/ja_JP.json b/src/Ryujinx/Assets/Locales/ja_JP.json
index 67dec4229..907740004 100644
--- a/src/Ryujinx/Assets/Locales/ja_JP.json
+++ b/src/Ryujinx/Assets/Locales/ja_JP.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "未実装サービスを無視する",
+ "SettingsTabSystemIgnoreApplet": "アプレットを無視する",
"SettingsTabGraphics": "グラフィックス",
"SettingsTabGraphicsAPI": "グラフィックスAPI",
"SettingsTabGraphicsEnableShaderCache": "シェーダーキャッシュを有効にする",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "JIT の代わりにハイパーバイザーを使用します. 利用可能な場合, パフォーマンスが大幅に向上しますが, 現在の状態では不安定になる可能性があります.",
"DRamTooltip": "エミュレートされたシステムのメモリ容量を 4GiB から 6GiB に増加します.\n\n高解像度のテクスチャパックや 4K解像度の mod を使用する場合に有用です. パフォーマンスを改善するものではありません.\n\nよくわからない場合はオフのままにしてください.",
"IgnoreMissingServicesTooltip": "未実装の Horizon OS サービスを無視します. 特定のゲームにおいて起動時のクラッシュを回避できる場合があります.\n\nよくわからない場合はオフのままにしてください.",
+ "IgnoreAppletTooltip": "ゲームプレイ中にゲームパッドが切断された場合、外部ダイアログ「コントローラーアプレット」は表示されません。このダイアログを閉じるか、新しいコントローラーを設定するように求めるプロンプトは表示されません。以前に切断されたコントローラーが再接続されると、ゲームは自動的に再開されます。",
"GraphicsBackendThreadingTooltip": "グラフィックスバックエンドのコマンドを別スレッドで実行します.\n\nシェーダのコンパイルを高速化し, 遅延を軽減し, マルチスレッド非対応の GPU ドライバにおいてパフォーマンスを改善します. マルチスレッド対応のドライバでも若干パフォーマンス改善が見られます.\n\nよくわからない場合は自動に設定してください.",
"GalThreadingTooltip": "グラフィックスバックエンドのコマンドを別スレッドで実行します.\n\nシェーダのコンパイルを高速化し, 遅延を軽減し, マルチスレッド非対応の GPU ドライバにおいてパフォーマンスを改善します. マルチスレッド対応のドライバでも若干パフォーマンス改善が見られます.\n\nよくわからない場合は自動に設定してください.",
"ShaderCacheToggleTooltip": "ディスクシェーダーキャッシュをセーブし,次回以降の実行時遅延を軽減します.\n\nよくわからない場合はオンのままにしてください.",
diff --git a/src/Ryujinx/Assets/Locales/ko_KR.json b/src/Ryujinx/Assets/Locales/ko_KR.json
index 5552d233e..f08c0e5f9 100644
--- a/src/Ryujinx/Assets/Locales/ko_KR.json
+++ b/src/Ryujinx/Assets/Locales/ko_KR.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "누락된 서비스 무시",
+ "SettingsTabSystemIgnoreApplet": "애플릿 무시",
"SettingsTabGraphics": "그래픽",
"SettingsTabGraphicsAPI": "그래픽 API",
"SettingsTabGraphicsEnableShaderCache": "셰이더 캐시 활성화",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "JIT 대신 하이퍼바이저를 사용합니다. 하이퍼바이저를 사용할 수 있을 때 성능을 향상시키지만, 현재 상태에서는 불안정할 수 있습니다.",
"DRamTooltip": "대체 메모리모드 레이아웃을 활용하여 스위치 개발 모델을 모방합니다.\n\n고해상도 텍스처 팩 또는 4k 해상도 모드에만 유용합니다. 성능을 향상시키지 않습니다.\n\n확실하지 않으면 꺼 두세요.",
"IgnoreMissingServicesTooltip": "구현되지 않은 호라이즌 OS 서비스를 무시합니다. 이것은 특정 게임을 부팅할 때 충돌을 우회하는 데 도움이 될 수 있습니다.\n\n확실하지 않으면 꺼 두세요.",
+ "IgnoreAppletTooltip": "게임 플레이 중에 게임패드의 연결이 끊어지면 외부 대화 상자 '컨트롤러 애플릿'이 나타나지 않습니다. 대화 상자를 닫거나 새 컨트롤러를 설정하라는 메시지도 표시되지 않습니다. 이전에 연결이 끊어진 컨트롤러가 다시 연결되면 게임이 자동으로 재개됩니다.",
"GraphicsBackendThreadingTooltip": "두 번째 스레드에서 그래픽 백엔드 명령을 실행합니다.\n\n세이더 컴파일 속도를 높이고 끊김 현상을 줄이며 자체 멀티스레딩 지원 없이 GPU 드라이버의 성능을 향상시킵니다. 멀티스레딩이 있는 드라이버에서 성능이 약간 향상되었습니다.\n\n잘 모르겠으면 자동으로 설정하세요.",
"GalThreadingTooltip": "두 번째 스레드에서 그래픽 백엔드 명령을 실행합니다.\n\n세이더 컴파일 속도를 높이고 끊김 현상을 줄이며 자체 멀티스레딩 지원 없이 GPU 드라이버의 성능을 향상시킵니다. 멀티스레딩이 있는 드라이버에서 성능이 약간 향상되었습니다.\n\n잘 모르겠으면 자동으로 설정하세요.",
"ShaderCacheToggleTooltip": "후속 실행에서 끊김 현상을 줄이는 디스크 세이더 캐시를 저장합니다.\n\n확실하지 않으면 켜 두세요.",
diff --git a/src/Ryujinx/Assets/Locales/pl_PL.json b/src/Ryujinx/Assets/Locales/pl_PL.json
index 92573ee40..03df59406 100644
--- a/src/Ryujinx/Assets/Locales/pl_PL.json
+++ b/src/Ryujinx/Assets/Locales/pl_PL.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignoruj Brakujące Usługi",
+ "SettingsTabSystemIgnoreApplet": "Ignoruj aplet",
"SettingsTabGraphics": "Grafika",
"SettingsTabGraphicsAPI": "Graficzne API",
"SettingsTabGraphicsEnableShaderCache": "Włącz pamięć podręczną cieni",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "Użyj Hiperwizora zamiast JIT. Znacznie poprawia wydajność, gdy jest dostępny, ale może być niestabilny w swoim obecnym stanie ",
"DRamTooltip": "Wykorzystuje alternatywny układ MemoryMode, aby naśladować model rozwojowy Switcha.\n\nJest to przydatne tylko w przypadku pakietów tekstur o wyższej rozdzielczości lub modów w rozdzielczości 4k. NIE poprawia wydajności.\n\nW razie wątpliwości pozostaw WYŁĄCZONE.",
"IgnoreMissingServicesTooltip": "Ignoruje niezaimplementowane usługi Horizon OS. Może to pomóc w ominięciu awarii podczas uruchamiania niektórych gier.\n\nW razie wątpliwości pozostaw WYŁĄCZONE.",
+ "IgnoreAppletTooltip": "Zewnętrzny dialog \"Controller Applet\" nie pojawi się, jeśli gamepad zostanie odłączony podczas rozgrywki. Nie pojawi się monit o zamknięcie dialogu lub skonfigurowanie nowego kontrolera. Po ponownym podłączeniu poprzednio odłączonego kontrolera gra zostanie automatycznie wznowiona.",
"GraphicsBackendThreadingTooltip": "Wykonuje polecenia backend'u graficznego w drugim wątku.\n\nPrzyspiesza kompilację shaderów, zmniejsza zacinanie się i poprawia wydajność sterowników GPU bez własnej obsługi wielowątkowości. Nieco lepsza wydajność w sterownikach z wielowątkowością.\n\nUstaw na AUTO, jeśli nie masz pewności.",
"GalThreadingTooltip": "Wykonuje polecenia backend'u graficznego w drugim wątku.\n\nPrzyspiesza kompilację shaderów, zmniejsza zacinanie się i poprawia wydajność sterowników GPU bez własnej obsługi wielowątkowości. Nieco lepsza wydajność w sterownikach z wielowątkowością.\n\nUstaw na AUTO, jeśli nie masz pewności.",
"ShaderCacheToggleTooltip": "Zapisuje pamięć podręczną shaderów na dysku, co zmniejsza zacinanie się w kolejnych uruchomieniach.\n\nPozostaw WŁĄCZONE, jeśli nie masz pewności.",
diff --git a/src/Ryujinx/Assets/Locales/pt_BR.json b/src/Ryujinx/Assets/Locales/pt_BR.json
index b951659f7..235ad388a 100644
--- a/src/Ryujinx/Assets/Locales/pt_BR.json
+++ b/src/Ryujinx/Assets/Locales/pt_BR.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignorar serviços não implementados",
+ "SettingsTabSystemIgnoreApplet": "Ignorar applet",
"SettingsTabGraphics": "Gráficos",
"SettingsTabGraphicsAPI": "API gráfica",
"SettingsTabGraphicsEnableShaderCache": "Habilitar cache de shader",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "Usa o Hypervisor em vez de JIT (recompilador dinâmico). Melhora significativamente o desempenho quando disponível, mas pode ser instável no seu estado atual.",
"DRamTooltip": "Expande a memória do sistema emulado de 4GiB para 6GiB",
"IgnoreMissingServicesTooltip": "Habilita ou desabilita a opção de ignorar serviços não implementados",
+ "IgnoreAppletTooltip": "O diálogo externo \"Controller Applet\" não aparecerá se o gamepad for desconectado durante o jogo. Não haverá prompt para fechar o diálogo ou configurar um novo controle. Assim que o controle desconectado anteriormente for reconectado, o jogo será retomado automaticamente.",
"GraphicsBackendThreadingTooltip": "Habilita multithreading do backend gráfico",
"GalThreadingTooltip": "Executa comandos do backend gráfico em uma segunda thread. Permite multithreading em tempo de execução da compilação de shader, diminui os travamentos, e melhora performance em drivers sem suporte embutido a multithreading. Pequena variação na performance máxima em drivers com suporte a multithreading. Ryujinx pode precisar ser reiniciado para desabilitar adequadamente o multithreading embutido do driver, ou você pode precisar fazer isso manualmente para ter a melhor performance.",
"ShaderCacheToggleTooltip": "Habilita ou desabilita o cache de shader",
diff --git a/src/Ryujinx/Assets/Locales/ru_RU.json b/src/Ryujinx/Assets/Locales/ru_RU.json
index 299631306..8b0235cb8 100644
--- a/src/Ryujinx/Assets/Locales/ru_RU.json
+++ b/src/Ryujinx/Assets/Locales/ru_RU.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Игнорировать отсутствующие службы",
+ "SettingsTabSystemIgnoreApplet": "Игнорировать Апплет",
"SettingsTabGraphics": "Графика",
"SettingsTabGraphicsAPI": "Графические API",
"SettingsTabGraphicsEnableShaderCache": "Кэшировать шейдеры",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "Использует Hypervisor вместо JIT. Значительно увеличивает производительность, но может работать нестабильно.",
"DRamTooltip": "Использует альтернативный макет MemoryMode для имитации использования Nintendo Switch в режиме разработчика.\n\nПолезно только для пакетов текстур с высоким разрешением или модов добавляющих разрешение 4К. Не улучшает производительность.\n\nРекомендуется оставить выключенным.",
"IgnoreMissingServicesTooltip": "Игнорирует нереализованные сервисы Horizon в новых прошивках. Эта настройка поможет избежать вылеты при запуске определенных игр.\n\nРекомендуется оставить выключенным.",
+ "IgnoreAppletTooltip": "Внешний диалог \"Апплет контроллера\" не появится, если геймпад будет отключен во время игры. Не будет предложено закрыть диалог или настроить новый контроллер. После повторного подключения ранее отключенного контроллера игра автоматически возобновится.",
"GraphicsBackendThreadingTooltip": "Выполняет команды графического бэкенда на втором потоке.\n\nУскоряет компиляцию шейдеров, уменьшает статтеры и повышает производительность на драйверах видеоадаптера без поддержки многопоточности. Производительность на драйверах с многопоточностью немного выше.\n\nРекомендуется оставить Автоматически.",
"GalThreadingTooltip": "Выполняет команды графического бэкенда на втором потоке.\n\nУскоряет компиляцию шейдеров, уменьшает статтеры и повышает производительность на драйверах видеоадаптера без поддержки многопоточности. Производительность на драйверах с многопоточностью немного выше.\n\nРекомендуется оставить Автоматически.",
"ShaderCacheToggleTooltip": "Сохраняет кэш шейдеров на диске, для уменьшения статтеров при последующих запусках.\n\nРекомендуется оставить включенным.",
diff --git a/src/Ryujinx/Assets/Locales/th_TH.json b/src/Ryujinx/Assets/Locales/th_TH.json
index 2b795c872..e300d0c35 100644
--- a/src/Ryujinx/Assets/Locales/th_TH.json
+++ b/src/Ryujinx/Assets/Locales/th_TH.json
@@ -1,7 +1,7 @@
{
"Language": "ภาษาไทย",
"MenuBarFileOpenApplet": "เปิด Applet",
- "MenuBarFileOpenAppletOpenMiiAppletToolTip": "เปิด Mii Editor Applet ในโหมดสแตนด์อโลน",
+ "MenuBarFileOpenAppletOpenMiiAppletToolTip": "เปิดโปรแกรม Mii Editor Applet",
"SettingsTabInputDirectMouseAccess": "เข้าถึงเมาส์ได้โดยตรง",
"SettingsTabSystemMemoryManagerMode": "โหมดจัดการหน่วยความจำ:",
"SettingsTabSystemMemoryManagerModeSoftware": "ซอฟต์แวร์",
@@ -10,12 +10,15 @@
"SettingsTabSystemUseHypervisor": "ใช้งาน Hypervisor",
"MenuBarFile": "ไฟล์",
"MenuBarFileOpenFromFile": "โหลดแอปพลิเคชั่นจากไฟล์",
- "MenuBarFileOpenUnpacked": "โหลดเกมที่คลายแพ็กแล้ว",
+ "MenuBarFileOpenFromFileError": "ไม่พบแอปพลิเคชั่นจากไฟล์ที่เลือก",
+ "MenuBarFileOpenUnpacked": "โหลดเกมที่แตกไฟล์แล้ว",
+ "MenuBarFileLoadDlcFromFolder": "โหลด DLC จากโฟลเดอร์",
+ "MenuBarFileLoadTitleUpdatesFromFolder": "โหลดไฟล์อัพเดตจากโฟลเดอร์",
"MenuBarFileOpenEmuFolder": "เปิดโฟลเดอร์ Ryujinx",
"MenuBarFileOpenLogsFolder": "เปิดโฟลเดอร์ Logs",
"MenuBarFileExit": "_ออก",
"MenuBarOptions": "_ตัวเลือก",
- "MenuBarOptionsToggleFullscreen": "สลับการแสดงผลแบบเต็มหน้าจอ",
+ "MenuBarOptionsToggleFullscreen": "สลับเป็นโหมดเต็มหน้าจอ",
"MenuBarOptionsStartGamesInFullscreen": "เริ่มเกมในโหมดเต็มหน้าจอ",
"MenuBarOptionsStopEmulation": "หยุดการจำลอง",
"MenuBarOptionsSettings": "_ตั้งค่า",
@@ -28,10 +31,10 @@
"MenuBarFileToolsInstallFirmwareFromFile": "ติดตั้งเฟิร์มแวร์จาก ไฟล์ XCI หรือ ไฟล์ ZIP",
"MenuBarFileToolsInstallFirmwareFromDirectory": "ติดตั้งเฟิร์มแวร์จากไดเร็กทอรี",
"MenuBarToolsManageFileTypes": "จัดการประเภทไฟล์",
- "MenuBarToolsInstallFileTypes": "ติดตั้งตามประเภทของไฟล์",
- "MenuBarToolsUninstallFileTypes": "ถอนการติดตั้งตามประเภทของไฟล์",
- "MenuBarView": "_View",
- "MenuBarViewWindow": "Window Size",
+ "MenuBarToolsInstallFileTypes": "ติดตั้งประเภทไฟล์",
+ "MenuBarToolsUninstallFileTypes": "ถอนการติดตั้งประเภทไฟล์",
+ "MenuBarView": "_มุมมอง",
+ "MenuBarViewWindow": "ขนาดหน้าต่าง",
"MenuBarViewWindow720": "720p",
"MenuBarViewWindow1080": "1080p",
"MenuBarHelp": "_ช่วยเหลือ",
@@ -49,59 +52,60 @@
"GameListHeaderFileSize": "ขนาดไฟล์",
"GameListHeaderPath": "ที่อยู่ไฟล์",
"GameListContextMenuOpenUserSaveDirectory": "เปิดไดเร็กทอรี่บันทึกของผู้ใช้",
- "GameListContextMenuOpenUserSaveDirectoryToolTip": "เปิดไดเร็กทอรี่ซึ่งมีการบันทึกผู้ใช้ของแอปพลิเคชัน",
+ "GameListContextMenuOpenUserSaveDirectoryToolTip": "เปิดไดเร็กทอรี่ซึ่งมีการบันทึกข้อมูลของผู้ใช้แอปพลิเคชัน",
"GameListContextMenuOpenDeviceSaveDirectory": "เปิดไดเร็กทอรี่บันทึกของอุปกรณ์",
- "GameListContextMenuOpenDeviceSaveDirectoryToolTip": "เปิดไดเรกทอรี่ซึ่งมีบันทึกอุปกรณ์ของแอปพลิเคชัน",
- "GameListContextMenuOpenBcatSaveDirectory": "เปิดไดเรกทอรี่บันทึก BCAT",
- "GameListContextMenuOpenBcatSaveDirectoryToolTip": "เปิดไดเรกทอรี่ซึ่งมีการบันทึก BCAT ของแอปพลิเคชัน",
- "GameListContextMenuManageTitleUpdates": "จัดการอัปเดตตามหัวข้อ",
- "GameListContextMenuManageTitleUpdatesToolTip": "เปิดหน้าต่างการจัดการการอัพเดตหัวข้อ",
+ "GameListContextMenuOpenDeviceSaveDirectoryToolTip": "เปิดไดเรกทอรี่ซึ่งมีบันทึกข้อมูลของอุปกรณ์ในแอปพลิเคชัน",
+ "GameListContextMenuOpenBcatSaveDirectory": "เปิดไดเรกทอรี่บันทึกของ BCAT",
+ "GameListContextMenuOpenBcatSaveDirectoryToolTip": "เปิดไดเรกทอรี่ซึ่งมีการบันทึกข้อมูลของ BCAT ในแอปพลิเคชัน",
+ "GameListContextMenuManageTitleUpdates": "จัดการเวอร์ชั่นอัปเดต",
+ "GameListContextMenuManageTitleUpdatesToolTip": "เปิดหน้าต่างการจัดการเวอร์ชั่นการอัพเดต",
"GameListContextMenuManageDlc": "จัดการ DLC",
"GameListContextMenuManageDlcToolTip": "เปิดหน้าต่างจัดการ DLC",
- "GameListContextMenuCacheManagement": "จัดการ แคช",
- "GameListContextMenuCacheManagementPurgePptc": "เพิ่มเข้าคิวงาน PPTC ที่สร้างใหม่",
- "GameListContextMenuCacheManagementPurgePptcToolTip": "ทริกเกอร์ PPTC ให้สร้างใหม่ในเวลาบูตเมื่อเปิดตัวเกมครั้งถัดไป",
- "GameListContextMenuCacheManagementPurgeShaderCache": "ล้างแคช พื้นผิวและแสงเงา",
- "GameListContextMenuCacheManagementPurgeShaderCacheToolTip": "ลบแคช พื้นผิวและแสงเงา ของแอปพลิเคชัน",
+ "GameListContextMenuCacheManagement": "จัดการแคช",
+ "GameListContextMenuCacheManagementPurgePptc": "เพิ่มคิวการสร้าง PPTC ใหม่",
+ "GameListContextMenuCacheManagementPurgePptcToolTip": "ให้ PPTC สร้างใหม่ในเวลาบูตเมื่อเปิดเกมครั้งถัดไป",
+ "GameListContextMenuCacheManagementPurgeShaderCache": "ล้างแคช แสงเงา",
+ "GameListContextMenuCacheManagementPurgeShaderCacheToolTip": "ลบแคช แสงเงา ของแอปพลิเคชัน",
"GameListContextMenuCacheManagementOpenPptcDirectory": "เปิดไดเรกทอรี่ PPTC",
- "GameListContextMenuCacheManagementOpenPptcDirectoryToolTip": "เปิดไดเร็กทอรี่ PPTC แคช ของแอปพลิเคชัน",
- "GameListContextMenuCacheManagementOpenShaderCacheDirectory": "เปิดไดเรกทอรี่ แคช พื้นผิวและแสงเงา",
- "GameListContextMenuCacheManagementOpenShaderCacheDirectoryToolTip": "เปิดไดเรกทอรี่ แคช พื้นผิวและแสงเงา ของแอปพลิเคชัน",
+ "GameListContextMenuCacheManagementOpenPptcDirectoryToolTip": "เปิดไดเร็กทอรี่ของ แคช PPTC ในแอปพลิเคชัน",
+ "GameListContextMenuCacheManagementOpenShaderCacheDirectory": "เปิดไดเรกทอรี่ แคช แสงเงา",
+ "GameListContextMenuCacheManagementOpenShaderCacheDirectoryToolTip": "เปิดไดเรกทอรี่ของ แคช แสงเงา ในแอปพลิเคชัน",
"GameListContextMenuExtractData": "แยกส่วนข้อมูล",
"GameListContextMenuExtractDataExeFS": "ExeFS",
- "GameListContextMenuExtractDataExeFSToolTip": "แยกส่วน ExeFS ออกจากการกำหนดค่าปัจจุบันของแอปพลิเคชัน (รวมถึงการอัปเดต)",
+ "GameListContextMenuExtractDataExeFSToolTip": "แยกส่วน ExeFS ออกจากการตั้งค่าปัจจุบันของแอปพลิเคชัน (รวมถึงอัปเดต)",
"GameListContextMenuExtractDataRomFS": "RomFS",
- "GameListContextMenuExtractDataRomFSToolTip": "แยกส่วน RomFS ออกจากการกำหนดค่าปัจจุบันของแอปพลิเคชัน (รวมถึงการอัพเดต)",
+ "GameListContextMenuExtractDataRomFSToolTip": "แยกส่วน RomFS ออกจากการตั้งค่าปัจจุบันของแอปพลิเคชัน (รวมถึงอัพเดต)",
"GameListContextMenuExtractDataLogo": "โลโก้",
- "GameListContextMenuExtractDataLogoToolTip": "แยกส่วน โลโก้ ออกจากการกำหนดค่าปัจจุบันของแอปพลิเคชัน (รวมถึงการอัปเดต)",
+ "GameListContextMenuExtractDataLogoToolTip": "แยกส่วน โลโก้ ออกจากการตั้งค่าปัจจุบันของแอปพลิเคชัน (รวมถึงอัปเดต)",
"GameListContextMenuCreateShortcut": "สร้างทางลัดของแอปพลิเคชัน",
- "GameListContextMenuCreateShortcutToolTip": "สร้างทางลัดบนเดสก์ท็อปที่เรียกใช้แอปพลิเคชันที่เลือก",
- "GameListContextMenuCreateShortcutToolTipMacOS": "สร้างทางลัดในโฟลเดอร์ Applications ของ macOS ที่เรียกใช้ Application ที่เลือก",
+ "GameListContextMenuCreateShortcutToolTip": "สร้างทางลัดบนเดสก์ท็อปสำหรับใช้แอปพลิเคชันที่เลือก",
+ "GameListContextMenuCreateShortcutToolTipMacOS": "สร้างทางลัดในโฟลเดอร์ Applications ของ macOS สำหรับใช้แอปพลิเคชันที่เลือก",
"GameListContextMenuOpenModsDirectory": "เปิดไดเร็กทอรี่ Mods",
"GameListContextMenuOpenModsDirectoryToolTip": "เปิดไดเร็กทอรี่ Mods ของแอปพลิเคชัน",
"GameListContextMenuOpenSdModsDirectory": "เปิดไดเร็กทอรี่ Mods Atmosphere",
- "GameListContextMenuOpenSdModsDirectoryToolTip": "เปิดไดเร็กทอรี่ Atmosphere ของการ์ด SD สำรองซึ่งมี Mods ของแอปพลิเคชัน มีประโยชน์สำหรับ Mods ที่บรรจุมากับฮาร์ดแวร์จริง",
+ "GameListContextMenuOpenSdModsDirectoryToolTip": "เปิดไดเร็กทอรี่ Atmosphere ของการ์ด SD สำรองซึ่งมี Mods ของแอปพลิเคชัน ซึ่งมีประโยชน์สำหรับ Mods ที่บรรจุมากับฮาร์ดแวร์จริง",
"StatusBarGamesLoaded": "เกมส์โหลดแล้ว {0}/{1}",
"StatusBarSystemVersion": "เวอร์ชั่นของระบบ: {0}",
- "LinuxVmMaxMapCountDialogTitle": "ตรวจพบขีดจำกัดต่ำสุด สำหรับการแมปหน่วยความจำ",
- "LinuxVmMaxMapCountDialogTextPrimary": "คุณต้องการที่จะเพิ่มค่า vm.max_map_count ไปยัง {0}",
- "LinuxVmMaxMapCountDialogTextSecondary": "บางเกมอาจพยายามสร้างการแมปหน่วยความจำมากกว่าที่ได้รับอนุญาตในปัจจุบัน รียูจินซ์ จะปิดตัวลงเมื่อเกินขีดจำกัดนี้",
+ "LinuxVmMaxMapCountDialogTitle": "การตั้งค่าหน่วยความถึงขีดจำกัดต่ำสุดแล้ว",
+ "LinuxVmMaxMapCountDialogTextPrimary": "คุณต้องเพิ่มค่า vm.max_map_count ไปยัง {0}",
+ "LinuxVmMaxMapCountDialogTextSecondary": "บางเกมอาจพยายามใช้งานหน่วยความจำมากกว่าที่ได้รับอนุญาตในปัจจุบัน Ryujinx จะปิดตัวลงเมื่อเกินขีดจำกัดนี้",
"LinuxVmMaxMapCountDialogButtonUntilRestart": "ใช่, จนกว่าจะรีสตาร์ทครั้งถัดไป",
"LinuxVmMaxMapCountDialogButtonPersistent": "ใช่, อย่างถาวร",
- "LinuxVmMaxMapCountWarningTextPrimary": "จำนวนสูงสุดของการแม็ปหน่วยความจำ ต่ำกว่าที่แนะนำ",
- "LinuxVmMaxMapCountWarningTextSecondary": "ค่าปัจจุบันของ vm.max_map_count ({0}) มีค่าต่ำกว่า {1} บางเกมอาจพยายามสร้างการแมปหน่วยความจำมากกว่าที่ได้รับอนุญาตในปัจจุบัน รียูจินซ์ จะปิดตัวลงเมื่อเกินขีดจำกัดนี้\n\nคุณอาจต้องการเพิ่มขีดจำกัดด้วยตนเองหรือติดตั้ง pkexec ซึ่งอนุญาตให้ ริวจินซ์ เพื่อช่วยเหลือคุณได้",
+ "LinuxVmMaxMapCountWarningTextPrimary": "จำนวนสูงสุดของการจัดการหน่วยความจำ ต่ำกว่าที่แนะนำ",
+ "LinuxVmMaxMapCountWarningTextSecondary": "ค่าปัจจุบันของ vm.max_map_count ({0}) มีค่าต่ำกว่า {1} บางเกมอาจพยายามใช้หน่วยความจำมากกว่าที่ได้รับอนุญาตในปัจจุบัน Ryujinx จะปิดตัวลงเมื่อเกินขีดจำกัดนี้\n\nคุณอาจต้องการตั้งค่าเพิ่มขีดจำกัดด้วยตนเองหรือติดตั้ง pkexec ซึ่งอนุญาตให้ Ryujinx ช่วยเหลือคุณได้",
"Settings": "ตั้งค่า",
"SettingsTabGeneral": "หน้าจอผู้ใช้",
"SettingsTabGeneralGeneral": "ทั่วไป",
"SettingsTabGeneralEnableDiscordRichPresence": "เปิดใช้งาน Discord Rich Presence",
"SettingsTabGeneralCheckUpdatesOnLaunch": "ตรวจหาการอัปเดตเมื่อเปิดโปรแกรม",
- "SettingsTabGeneralShowConfirmExitDialog": "แสดง \"ยืนยันการออก\" กล่องข้อความโต้ตอบ",
- "SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
+ "SettingsTabGeneralShowConfirmExitDialog": "แสดง \"ปุ่มยืนยันการออก\" เมื่อออกเกม",
+ "SettingsTabGeneralRememberWindowState": "จดจำ ขนาดหน้าต่างแอพพลิเคชั่น/คำแหน่ง",
"SettingsTabGeneralHideCursor": "ซ่อน เคอร์เซอร์:",
- "SettingsTabGeneralHideCursorNever": "ไม่มี",
- "SettingsTabGeneralHideCursorOnIdle": "เมื่อไม่ได้ใช้",
+ "SettingsTabGeneralHideCursorNever": "ไม่ต้อง",
+ "SettingsTabGeneralHideCursorOnIdle": "เมื่อไม่ได้ใช้งาน",
"SettingsTabGeneralHideCursorAlways": "ตลอดเวลา",
"SettingsTabGeneralGameDirectories": "ไดเรกทอรี่ของเกม",
+ "SettingsTabGeneralAutoloadDirectories": "โหลดไดเรกทอรี DLC/ไฟล์อัปเดต อัตโนมัติ",
"SettingsTabGeneralAdd": "เพิ่ม",
"SettingsTabGeneralRemove": "เอาออก",
"SettingsTabSystem": "ระบบ",
@@ -136,7 +140,7 @@
"SettingsTabSystemSystemTime": "เวลาของระบบ:",
"SettingsTabSystemEnableVsync": "VSync",
"SettingsTabSystemEnablePptc": "PPTC (แคชโปรไฟล์การแปลแบบถาวร)",
- "SettingsTabSystemEnableLowPowerPptc": "Low-power PPTC",
+ "SettingsTabSystemEnableLowPowerPptc": "PPTC แบบพลังงานตํ่า",
"SettingsTabSystemEnableFsIntegrityChecks": "ตรวจสอบความถูกต้องของ FS",
"SettingsTabSystemAudioBackend": "ระบบเสียงเบื้องหลัง:",
"SettingsTabSystemAudioBackendDummy": "Dummy",
@@ -145,15 +149,16 @@
"SettingsTabSystemAudioBackendSDL2": "SDL2",
"SettingsTabSystemHacks": "แฮ็ก",
"SettingsTabSystemHacksNote": "อาจทำให้เกิดข้อผิดพลาดได้",
- "SettingsTabSystemDramSize": "ใช้รูปแบบหน่วยความจำสำรอง (โหมดนักพัฒนา)",
+ "SettingsTabSystemDramSize": "ใช้หน่วยความจำสำรอง (โหมดนักพัฒนา)",
"SettingsTabSystemDramSize4GiB": "4GiB",
"SettingsTabSystemDramSize6GiB": "6GiB",
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
- "SettingsTabSystemIgnoreMissingServices": "ไม่สนใจบริการที่ขาดหายไป",
- "SettingsTabGraphics": "กราฟิก",
- "SettingsTabGraphicsAPI": "กราฟฟิก API",
- "SettingsTabGraphicsEnableShaderCache": "เปิดใช้งาน แคชพื้นผิวและแสงเงา",
+ "SettingsTabSystemIgnoreMissingServices": "เมินเฉยบริการที่หายไป",
+ "SettingsTabSystemIgnoreApplet": "เมินเฉย Applet",
+ "SettingsTabGraphics": "กราฟฟิก",
+ "SettingsTabGraphicsAPI": "API กราฟฟิก",
+ "SettingsTabGraphicsEnableShaderCache": "เปิดใช้งาน แคชแสงเงา",
"SettingsTabGraphicsAnisotropicFiltering": "ตัวกรองแบบ Anisotropic:",
"SettingsTabGraphicsAnisotropicFilteringAuto": "อัตโนมัติ",
"SettingsTabGraphicsAnisotropicFiltering2x": "2x",
@@ -162,7 +167,7 @@
"SettingsTabGraphicsAnisotropicFiltering16x": "16x",
"SettingsTabGraphicsResolutionScale": "อัตราส่วนความละเอียด:",
"SettingsTabGraphicsResolutionScaleCustom": "กำหนดเอง (ไม่แนะนำ)",
- "SettingsTabGraphicsResolutionScaleNative": "พื้นฐานของระบบ (720p/1080p)",
+ "SettingsTabGraphicsResolutionScaleNative": "พื้นฐานระบบ (720p/1080p)",
"SettingsTabGraphicsResolutionScale2x": "2x (1440p/2160p)",
"SettingsTabGraphicsResolutionScale3x": "3x (2160p/3240p)",
"SettingsTabGraphicsResolutionScale4x": "4x (2880p/4320p) (ไม่แนะนำ)",
@@ -174,18 +179,18 @@
"SettingsTabGraphicsAspectRatio32x9": "32:9",
"SettingsTabGraphicsAspectRatioStretch": "ยืดภาพเพื่อให้พอดีกับหน้าต่าง",
"SettingsTabGraphicsDeveloperOptions": "ตัวเลือกนักพัฒนา",
- "SettingsTabGraphicsShaderDumpPath": "ที่เก็บ ดัมพ์ไฟล์ พื้นผิวและแสงเงา:",
+ "SettingsTabGraphicsShaderDumpPath": "ที่เก็บ ดัมพ์ไฟล์ แสงเงา:",
"SettingsTabLogging": "ประวัติ",
"SettingsTabLoggingLogging": "ประวัติ",
- "SettingsTabLoggingEnableLoggingToFile": "เปิดใช้งาน ประวัติ ไปยังไฟล์",
- "SettingsTabLoggingEnableStubLogs": "เปิดใช้งาน ประวัติ",
- "SettingsTabLoggingEnableInfoLogs": "เปิดใช้งาน ประวัติการใช้งาน",
- "SettingsTabLoggingEnableWarningLogs": "เปิดใช้งาน ประวัติคำเตือน",
- "SettingsTabLoggingEnableErrorLogs": "เปิดใช้งาน ประวัติข้อผิดพลาด",
- "SettingsTabLoggingEnableTraceLogs": "เปิดใช้งาน ประวัติการติดตาม",
- "SettingsTabLoggingEnableGuestLogs": "เปิดใช้งาน บันทึกของผู้เยี่ยมชม",
- "SettingsTabLoggingEnableFsAccessLogs": "เปิดใช้งาน ประวัติการเข้าถึง Fs",
- "SettingsTabLoggingFsGlobalAccessLogMode": "โหมด ประวัติการเข้าถึงส่วนกลาง:",
+ "SettingsTabLoggingEnableLoggingToFile": "เปิดใช้งานการบันทึกประวัติ ไปยังไฟล์",
+ "SettingsTabLoggingEnableStubLogs": "เปิดใช้งานการบันทึกประวัติ",
+ "SettingsTabLoggingEnableInfoLogs": "เปิดใช้งานการบันทึกประวัติการใช้งาน",
+ "SettingsTabLoggingEnableWarningLogs": "เปิดใช้งานการบันทึกประวัติคำเตือน",
+ "SettingsTabLoggingEnableErrorLogs": "เปิดใช้งานการบันทึกประวัติข้อผิดพลาด",
+ "SettingsTabLoggingEnableTraceLogs": "เปิดใช้งานการบันทึกประวัติการติดตาม",
+ "SettingsTabLoggingEnableGuestLogs": "เปิดใช้งานการบันทึกประวัติผู้เยี่ยมชม",
+ "SettingsTabLoggingEnableFsAccessLogs": "เปิดใช้งานการบันทึกประวัติการเข้าถึง Fs",
+ "SettingsTabLoggingFsGlobalAccessLogMode": "โหมด การเข้าถึงประวัติส่วนกลาง:",
"SettingsTabLoggingDeveloperOptions": "ตัวเลือกนักพัฒนา",
"SettingsTabLoggingDeveloperOptionsNote": "คำเตือน: จะทำให้ประสิทธิภาพลดลง",
"SettingsTabLoggingGraphicsBackendLogLevel": "ระดับการบันทึกประวัติ กราฟิกเบื้องหลัง:",
@@ -193,7 +198,7 @@
"SettingsTabLoggingGraphicsBackendLogLevelError": "ผิดพลาด",
"SettingsTabLoggingGraphicsBackendLogLevelPerformance": "ช้าลง",
"SettingsTabLoggingGraphicsBackendLogLevelAll": "ทั้งหมด",
- "SettingsTabLoggingEnableDebugLogs": "เปิดใช้งาน ประวัติแก้ไขข้อบกพร่อง",
+ "SettingsTabLoggingEnableDebugLogs": "เปิดใช้งาน ประวัติข้อบกพร่อง",
"SettingsTabInput": "ป้อนข้อมูล",
"SettingsTabInputEnableDockedMode": "ด็อกโหมด",
"SettingsTabInputDirectKeyboardAccess": "เข้าถึงคีย์บอร์ดโดยตรง",
@@ -215,7 +220,7 @@
"ControllerSettingsInputDevice": "อุปกรณ์ป้อนข้อมูล",
"ControllerSettingsRefresh": "รีเฟรช",
"ControllerSettingsDeviceDisabled": "ปิดการใช้งาน",
- "ControllerSettingsControllerType": "ประเภทของคอนโทรลเลอร์",
+ "ControllerSettingsControllerType": "ประเภทคอนโทรลเลอร์",
"ControllerSettingsControllerTypeHandheld": "แฮนด์เฮลด์",
"ControllerSettingsControllerTypeProController": "โปรคอนโทรลเลอร์",
"ControllerSettingsControllerTypeJoyConPair": "จับคู่ จอยคอน",
@@ -265,18 +270,18 @@
"ControllerSettingsExtraButtonsLeft": "ปุ่มกดเสริม ด้านซ้าย",
"ControllerSettingsExtraButtonsRight": "ปุ่มกดเสริม ด้านขวา",
"ControllerSettingsMisc": "การควบคุมเพิ่มเติม",
- "ControllerSettingsTriggerThreshold": "ตั้งค่าขีดจำกัดของ ทริกเกอร์:",
+ "ControllerSettingsTriggerThreshold": "ตั้งค่าขีดจำกัดการกด:",
"ControllerSettingsMotion": "การเคลื่อนไหว",
"ControllerSettingsMotionUseCemuhookCompatibleMotion": "ใช้การเคลื่อนไหวที่เข้ากันได้กับ CemuHook",
"ControllerSettingsMotionControllerSlot": "ช่องเสียบ คอนโทรลเลอร์:",
"ControllerSettingsMotionMirrorInput": "นำเข้าการสะท้อน การควบคุม",
"ControllerSettingsMotionRightJoyConSlot": "ช่องเสียบ จอยคอน ด้านขวา:",
"ControllerSettingsMotionServerHost": "เจ้าของเซิร์ฟเวอร์:",
- "ControllerSettingsMotionGyroSensitivity": "ความไวของไจโร:",
- "ControllerSettingsMotionGyroDeadzone": "ส่วนไม่ทำงานของไจโร:",
+ "ControllerSettingsMotionGyroSensitivity": "ความไวของ Gyro:",
+ "ControllerSettingsMotionGyroDeadzone": "ส่วนไม่ทำงานของ Gyro:",
"ControllerSettingsSave": "บันทึก",
"ControllerSettingsClose": "ปิด",
- "KeyUnknown": "Unknown",
+ "KeyUnknown": "ไม่รู้จัก",
"KeyShiftLeft": "Shift Left",
"KeyShiftRight": "Shift Right",
"KeyControlLeft": "Ctrl Left",
@@ -377,7 +382,7 @@
"GamepadSingleRightTrigger1": "Right Trigger 1",
"StickLeft": "Left Stick",
"StickRight": "Right Stick",
- "UserProfilesSelectedUserProfile": "โปรไฟล์ผู้ใช้งานที่เลือก:",
+ "UserProfilesSelectedUserProfile": "เลือกโปรไฟล์ผู้ใช้งาน:",
"UserProfilesSaveProfileName": "บันทึกชื่อโปรไฟล์",
"UserProfilesChangeProfileImage": "เปลี่ยนรูปโปรไฟล์",
"UserProfilesAvailableUserProfiles": "โปรไฟล์ผู้ใช้ที่ใช้งานได้:",
@@ -387,9 +392,9 @@
"ProfileNameSelectionWatermark": "เลือก ชื่อเล่น",
"ProfileImageSelectionTitle": "เลือก รูปโปรไฟล์ ของคุณ",
"ProfileImageSelectionHeader": "เลือก รูปโปรไฟล์",
- "ProfileImageSelectionNote": "คุณสามารถนำเข้ารูปโปรไฟล์ที่กำหนดเอง หรือ เลือกอวาต้าจากเฟิร์มแวร์ระบบได้",
+ "ProfileImageSelectionNote": "คุณสามารถนำเข้ารูปโปรไฟล์ที่กำหนดเองได้ หรือ เลือกรูปที่มีจากระบบ",
"ProfileImageSelectionImportImage": "นำเข้า ไฟล์รูปภาพ",
- "ProfileImageSelectionSelectAvatar": "เลือก รูปอวาต้า เฟิร์มแวร์",
+ "ProfileImageSelectionSelectAvatar": "เลือก รูปอวาต้า จากระบบ",
"InputDialogTitle": "กล่องโต้ตอบการป้อนข้อมูล",
"InputDialogOk": "ตกลง",
"InputDialogCancel": "ยกเลิก",
@@ -405,98 +410,99 @@
"ControllerSettingsSaveProfileToolTip": "บันทึก โปรไฟล์",
"MenuBarFileToolsTakeScreenshot": "ถ่ายภาพหน้าจอ",
"MenuBarFileToolsHideUi": "ซ่อน UI",
- "GameListContextMenuRunApplication": "เรียกใช้แอปพลิเคชัน",
+ "GameListContextMenuRunApplication": "เปิดใช้งานแอปพลิเคชัน",
"GameListContextMenuToggleFavorite": "สลับรายการโปรด",
"GameListContextMenuToggleFavoriteToolTip": "สลับสถานะเกมที่ชื่นชอบ",
"SettingsTabGeneralTheme": "ธีม:",
+ "SettingsTabGeneralThemeAuto": "อัตโนมัติ",
"SettingsTabGeneralThemeDark": "มืด",
"SettingsTabGeneralThemeLight": "สว่าง",
"ControllerSettingsConfigureGeneral": "กำหนดค่า",
"ControllerSettingsRumble": "การสั่นไหว",
- "ControllerSettingsRumbleStrongMultiplier": "เพิ่มความแรงการสั่นไหว",
- "ControllerSettingsRumbleWeakMultiplier": "ลดความแรงการสั่นไหว",
+ "ControllerSettingsRumbleStrongMultiplier": "เพิ่มความแรงการสั่น",
+ "ControllerSettingsRumbleWeakMultiplier": "ลดความแรงการสั่น",
"DialogMessageSaveNotAvailableMessage": "ไม่มีข้อมูลบันทึกไว้สำหรับ {0} [{1:x16}]",
- "DialogMessageSaveNotAvailableCreateSaveMessage": "คุณต้องการสร้างข้อมูลบันทึกสำหรับเกมนี้หรือไม่?",
- "DialogConfirmationTitle": "ริวจินซ์ - ยืนยัน",
- "DialogUpdaterTitle": "รียูจินซ์ - อัพเดต",
- "DialogErrorTitle": "รียูจินซ์ - ผิดพลาด",
- "DialogWarningTitle": "รียูจินซ์ - คำเตือน",
- "DialogExitTitle": "รียูจินซ์ - ออก",
- "DialogErrorMessage": "รียูจินซ์ พบข้อผิดพลาด",
- "DialogExitMessage": "คุณแน่ใจหรือไม่ว่าต้องการปิด ริวจินซ์ หรือไม่?",
- "DialogExitSubMessage": "ข้อมูลที่ไม่ได้บันทึกทั้งหมดจะสูญหาย!",
- "DialogMessageCreateSaveErrorMessage": "มีข้อผิดพลาดในการสร้างข้อมูลการบันทึกที่ระบุ: {0}",
- "DialogMessageFindSaveErrorMessage": "มีข้อผิดพลาดในการค้นหาข้อมูลที่บันทึกไว้ที่ระบุ: {0}",
+ "DialogMessageSaveNotAvailableCreateSaveMessage": "คุณต้องการสร้างบันทึกข้อมูลสำหรับเกมนี้หรือไม่?",
+ "DialogConfirmationTitle": "Ryujinx - ยืนยัน",
+ "DialogUpdaterTitle": "Ryujinx - อัพเดต",
+ "DialogErrorTitle": "Ryujinx - ผิดพลาด",
+ "DialogWarningTitle": "Ryujinx - คำเตือน",
+ "DialogExitTitle": "Ryujinx - ออก",
+ "DialogErrorMessage": "Ryujinx พบข้อผิดพลาด",
+ "DialogExitMessage": "คุณแน่ใจหรือไม่ว่าต้องการปิด Ryujinx หรือไม่?",
+ "DialogExitSubMessage": "ข้อมูลทั้งหมดที่ไม่ได้บันทึกทั้งหมดจะสูญหาย!",
+ "DialogMessageCreateSaveErrorMessage": "มีข้อผิดพลาดในการสร้างข้อมูลบันทึกที่ระบุ: {0}",
+ "DialogMessageFindSaveErrorMessage": "มีข้อผิดพลาดในการค้นหาข้อมูลบันทึกที่ระบุไว้: {0}",
"FolderDialogExtractTitle": "เลือกโฟลเดอร์ที่จะแตกไฟล์เข้าไป",
"DialogNcaExtractionMessage": "กำลังแตกไฟล์ {0} จากส่วน {1}...",
- "DialogNcaExtractionTitle": "รียูจินซ์ - เครื่องมือแตกไฟล์ของ NCA",
+ "DialogNcaExtractionTitle": "Ryujinx - เครื่องมือแตกไฟล์ของ NCA",
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "เกิดความล้มเหลวในการแตกไฟล์เนื่องจากไม่พบ NCA หลักในไฟล์ที่เลือก",
- "DialogNcaExtractionCheckLogErrorMessage": "เกิดความล้มเหลวในการแตกไฟล์ โปรดอ่านไฟล์บันทึกเพื่อดูข้อมูลเพิ่มเติม",
+ "DialogNcaExtractionCheckLogErrorMessage": "เกิดความล้มเหลวในการแตกไฟล์ โปรดอ่านไฟล์บันทึกประวัติเพื่อดูข้อมูลเพิ่มเติม",
"DialogNcaExtractionSuccessMessage": "การแตกไฟล์เสร็จสมบูรณ์แล้ว",
- "DialogUpdaterConvertFailedMessage": "ไม่สามารถแปลงเวอร์ชั่น รียูจินซ์ ปัจจุบันได้",
+ "DialogUpdaterConvertFailedMessage": "ไม่สามารถแปลงเวอร์ชั่น Ryujinx ปัจจุบันได้",
"DialogUpdaterCancelUpdateMessage": "ยกเลิกการอัพเดต!",
- "DialogUpdaterAlreadyOnLatestVersionMessage": "คุณกำลังใช้ รียูจินซ์ เวอร์ชั่นที่อัปเดตล่าสุด!",
- "DialogUpdaterFailedToGetVersionMessage": "เกิดข้อผิดพลาดขณะพยายามรับข้อมูลเวอร์ชั่นจาก GitHub Release ปัญหานี้อาจเกิดขึ้นได้หากมีการรวบรวมเวอร์ชั่นใหม่โดย GitHub Actions โปรดลองอีกครั้งในอีกไม่กี่นาทีข้างหน้า",
- "DialogUpdaterConvertFailedGithubMessage": "ไม่สามารถแปลงเวอร์ชั่น รียูจินซ์ ที่ได้รับจาก Github Release",
+ "DialogUpdaterAlreadyOnLatestVersionMessage": "คุณกำลังใช้ Ryujinx เวอร์ชั่นที่อัปเดตล่าสุด!",
+ "DialogUpdaterFailedToGetVersionMessage": "เกิดข้อผิดพลาดขณะพยายามรับข้อมูลเวอร์ชั่นจาก GitHub Release ปัญหานี้อาจเกิดขึ้นได้หากมีการรวบรวมเวอร์ชั่นใหม่โดย GitHub โปรดลองอีกครั้งในอีกไม่กี่นาทีข้างหน้า",
+ "DialogUpdaterConvertFailedGithubMessage": "ไม่สามารถแปลงเวอร์ชั่น Ryujinx ที่ได้รับจาก Github Release",
"DialogUpdaterDownloadingMessage": "กำลังดาวน์โหลดอัปเดต...",
"DialogUpdaterExtractionMessage": "กำลังแตกไฟล์อัปเดต...",
"DialogUpdaterRenamingMessage": "กำลังลบไฟล์เก่า...",
"DialogUpdaterAddingFilesMessage": "กำลังเพิ่มไฟล์อัปเดตใหม่...",
"DialogUpdaterCompleteMessage": "อัปเดตเสร็จสมบูรณ์แล้ว!",
- "DialogUpdaterRestartMessage": "คุณต้องการรีสตาร์ท รียูจินซ์ ตอนนี้หรือไม่?",
+ "DialogUpdaterRestartMessage": "คุณต้องการรีสตาร์ท Ryujinx ตอนนี้หรือไม่?",
"DialogUpdaterNoInternetMessage": "คุณไม่ได้เชื่อมต่อกับอินเทอร์เน็ต!",
"DialogUpdaterNoInternetSubMessage": "โปรดตรวจสอบว่าคุณมีการเชื่อมต่ออินเทอร์เน็ตว่ามีการใช้งานได้หรือไม่!",
- "DialogUpdaterDirtyBuildMessage": "คุณไม่สามารถอัปเดต Dirty build ของ รียูจินซ์ ได้!",
- "DialogUpdaterDirtyBuildSubMessage": "โปรดดาวน์โหลด รียูจินซ์ ได้ที่ https://https://github.com/GreemDev/Ryujinx/releases/ หากคุณกำลังมองหาเวอร์ชั่นที่รองรับ",
+ "DialogUpdaterDirtyBuildMessage": "คุณไม่สามารถอัปเดต Dirty build ของ Ryujinx ได้!",
+ "DialogUpdaterDirtyBuildSubMessage": "โปรดดาวน์โหลด Ryujinx ได้ที่ https://https://github.com/GreemDev/Ryujinx/releases/ หากคุณกำลังมองหาเวอร์ชั่นที่รองรับ",
"DialogRestartRequiredMessage": "จำเป็นต้องรีสตาร์ทเพื่อให้การอัพเดตสามารถให้งานได้",
"DialogThemeRestartMessage": "บันทึกธีมแล้ว จำเป็นต้องรีสตาร์ทเพื่อใช้ธีม",
"DialogThemeRestartSubMessage": "คุณต้องการรีสตาร์ทหรือไม่?",
"DialogFirmwareInstallEmbeddedMessage": "คุณต้องการติดตั้งเฟิร์มแวร์ที่ฝังอยู่ในเกมนี้หรือไม่? (เฟิร์มแวร์ {0})",
- "DialogFirmwareInstallEmbeddedSuccessMessage": "ไม่พบเฟิร์มแวร์ที่ติดตั้งไว้ แต่ รียูจินซ์ สามารถติดตั้งเฟิร์มแวร์ได้ {0} จากเกมที่ให้มา\nตอนนี้โปรแกรมจำลองจะเริ่มทำงาน",
+ "DialogFirmwareInstallEmbeddedSuccessMessage": "ไม่พบเฟิร์มแวร์ที่ติดตั้งไว้ แต่ Ryujinx จะติดตั้งเฟิร์มแวร์ได้ {0} จากเกมที่ให้มา\nขณะนี้โปรแกรมจำลองจะเริ่มทำงาน",
"DialogFirmwareNoFirmwareInstalledMessage": "ไม่มีการติดตั้งเฟิร์มแวร์",
- "DialogFirmwareInstalledMessage": "เฟิร์มแวร์ติดตั้งแล้ว {0}",
+ "DialogFirmwareInstalledMessage": "เฟิร์มแวร์ {0} ติดตั้งแล้ว",
"DialogInstallFileTypesSuccessMessage": "ติดตั้งตามประเภทของไฟล์สำเร็จแล้ว!",
"DialogInstallFileTypesErrorMessage": "ติดตั้งตามประเภทของไฟล์ไม่สำเร็จ",
"DialogUninstallFileTypesSuccessMessage": "ถอนการติดตั้งตามประเภทของไฟล์สำเร็จแล้ว!",
"DialogUninstallFileTypesErrorMessage": "ไม่สามารถถอนการติดตั้งตามประเภทของไฟล์ได้",
"DialogOpenSettingsWindowLabel": "เปิดหน้าต่างการตั้งค่า",
- "DialogControllerAppletTitle": "แอพเพล็ตคอนโทรลเลอร์",
+ "DialogControllerAppletTitle": "คอนโทรลเลอร์ Applet",
"DialogMessageDialogErrorExceptionMessage": "เกิดข้อผิดพลาดในการแสดงกล่องโต้ตอบข้อความ: {0}",
"DialogSoftwareKeyboardErrorExceptionMessage": "เกิดข้อผิดพลาดในการแสดงซอฟต์แวร์แป้นพิมพ์: {0}",
- "DialogErrorAppletErrorExceptionMessage": "เกิดข้อผิดพลาดในการแสดงกล่องโต้ตอบ ข้อผิดพลาด แอปเพล็ต: {0}",
+ "DialogErrorAppletErrorExceptionMessage": "เกิดข้อผิดพลาดในการแสดงกล่องโต้ตอบ ข้อผิดพลาดของ Applet: {0}",
"DialogUserErrorDialogMessage": "{0}: {1}",
"DialogUserErrorDialogInfoMessage": "\nสำหรับข้อมูลเพิ่มเติมเกี่ยวกับวิธีแก้ไขข้อผิดพลาดนี้ โปรดทำตามคำแนะนำในการตั้งค่าของเรา",
- "DialogUserErrorDialogTitle": "ข้อผิดพลาด รียูจินซ์ ({0})",
- "DialogAmiiboApiTitle": "อะมิโบ API",
+ "DialogUserErrorDialogTitle": "ข้อผิดพลาด Ryujinx ({0})",
+ "DialogAmiiboApiTitle": "Amiibo API",
"DialogAmiiboApiFailFetchMessage": "เกิดข้อผิดพลาดขณะเรียกข้อมูลจาก API",
- "DialogAmiiboApiConnectErrorMessage": "ไม่สามารถเชื่อมต่อกับเซิร์ฟเวอร์ อะมิโบ API บ้างบริการอาจหยุดทำงาน หรือไม่คุณต้องทำการตรวจสอบว่าการเชื่อมต่ออินเทอร์เน็ตของคุณอยู่ในสถานะเชื่อมต่ออยู่หรือไม่",
- "DialogProfileInvalidProfileErrorMessage": "โปรไฟล์ {0} เข้ากันไม่ได้กับระบบการกำหนดค่าอินพุตปัจจุบัน",
- "DialogProfileDefaultProfileOverwriteErrorMessage": "ไม่สามารถเขียนทับโปรไฟล์เริ่มต้นได้",
+ "DialogAmiiboApiConnectErrorMessage": "ไม่สามารถเชื่อมต่อกับเซิร์ฟเวอร์ Amiibo API บางบริการอาจหยุดทำงาน หรือไม่คุณต้องทำการตรวจสอบว่าอินเทอร์เน็ตของคุณอยู่ในสถานะเชื่อมต่ออยู่หรือไม่",
+ "DialogProfileInvalidProfileErrorMessage": "โปรไฟล์ {0} ไม่สามารถทำงานได้กับระบบกำหนดค่าอินพุตปัจจุบัน",
+ "DialogProfileDefaultProfileOverwriteErrorMessage": "โปรไฟล์เริ่มต้นไม่สามารถเขียนทับได้",
"DialogProfileDeleteProfileTitle": "กำลังลบโปรไฟล์",
"DialogProfileDeleteProfileMessage": "การดำเนินการนี้ไม่สามารถย้อนกลับได้ คุณแน่ใจหรือไม่ว่าต้องการดำเนินการต่อหรือไม่?",
"DialogWarning": "คำเตือน",
- "DialogPPTCDeletionMessage": "คุณกำลังจะจัดคิวการสร้าง PPTC ใหม่ในการบูตครั้งถัดไป:\n\n{0}\n\nคุณแน่ใจหรือไม่ว่าต้องการดำเนินการต่อหรือไม่?",
+ "DialogPPTCDeletionMessage": "คุณกำลังตั้งค่าให้มีการสร้าง PPTC ใหม่ในการบูตครั้งถัดไป:\n\n{0}\n\nคุณแน่ใจหรือไม่ว่าต้องการดำเนินการต่อหรือไม่?",
"DialogPPTCDeletionErrorMessage": "มีข้อผิดพลาดในการล้างแคช PPTC {0}: {1}",
- "DialogShaderDeletionMessage": "คุณกำลังจะลบ เชเดอร์แคช:\n\n{0}\n\nคุณแน่ใจหรือไม่ว่าต้องการดำเนินการต่อหรือไม่?",
- "DialogShaderDeletionErrorMessage": "เกิดข้อผิดพลาดในการล้าง เชเดอร์แคช {0}: {1}",
- "DialogRyujinxErrorMessage": "รียูจินซ์ พบข้อผิดพลาด",
+ "DialogShaderDeletionMessage": "คุณกำลังจะลบแคชแสงเงา:\n\n{0}\n\nคุณแน่ใจหรือไม่ว่าต้องการดำเนินการต่อหรือไม่?",
+ "DialogShaderDeletionErrorMessage": "เกิดข้อผิดพลาดในการล้าง แคชแสงเงา {0}: {1}",
+ "DialogRyujinxErrorMessage": "Ryujinx พบข้อผิดพลาด",
"DialogInvalidTitleIdErrorMessage": "ข้อผิดพลาดของ UI: เกมที่เลือกไม่มีชื่อ ID ที่ถูกต้อง",
"DialogFirmwareInstallerFirmwareNotFoundErrorMessage": "ไม่พบเฟิร์มแวร์ของระบบที่ถูกต้อง {0}.",
"DialogFirmwareInstallerFirmwareInstallTitle": "ติดตั้งเฟิร์มแวร์ {0}",
- "DialogFirmwareInstallerFirmwareInstallMessage": "นี่คื่อเวอร์ชั่นของระบบ {0} ที่ได้รับการติดตั้งเมื่อเร็วๆ นี้",
- "DialogFirmwareInstallerFirmwareInstallSubMessage": "\n\nสิ่งนี้จะแทนที่เวอร์ชั่นของระบบปัจจุบัน {0}.",
+ "DialogFirmwareInstallerFirmwareInstallMessage": "ระบบเวอร์ชั่น {0} ได้รับการติดตั้งเร็วๆ นี้",
+ "DialogFirmwareInstallerFirmwareInstallSubMessage": "\n\nสิ่งนี้จะแทนที่เวอร์ชั่นของระบบเวอร์ชั่นปัจจุบัน {0}.",
"DialogFirmwareInstallerFirmwareInstallConfirmMessage": "\n\nคุณต้องการดำเนินการต่อหรือไม่?",
"DialogFirmwareInstallerFirmwareInstallWaitMessage": "กำลังติดตั้งเฟิร์มแวร์...",
- "DialogFirmwareInstallerFirmwareInstallSuccessMessage": "การติดตั้งเวอร์ชั่นระบบ {0} เรียบร้อยแล้ว",
+ "DialogFirmwareInstallerFirmwareInstallSuccessMessage": "ระบบเวอร์ชั่น {0} ติดตั้งเรียบร้อยแล้ว",
"DialogUserProfileDeletionWarningMessage": "จะไม่มีโปรไฟล์อื่นให้เปิดหากโปรไฟล์ที่เลือกถูกลบ",
"DialogUserProfileDeletionConfirmMessage": "คุณต้องการลบโปรไฟล์ที่เลือกหรือไม่?",
"DialogUserProfileUnsavedChangesTitle": "คำเตือน - มีการเปลี่ยนแปลงที่ไม่ได้บันทึก",
"DialogUserProfileUnsavedChangesMessage": "คุณได้ทำการเปลี่ยนแปลงโปรไฟล์ผู้ใช้นี้โดยไม่ได้รับการบันทึก",
- "DialogUserProfileUnsavedChangesSubMessage": "คุณต้องการยกเลิกการเปลี่ยนแปลงของคุณหรือไม่?",
+ "DialogUserProfileUnsavedChangesSubMessage": "คุณต้องการทิ้งการเปลี่ยนแปลงของคุณหรือไม่?",
"DialogControllerSettingsModifiedConfirmMessage": "การตั้งค่าคอนโทรลเลอร์ปัจจุบันได้รับการอัปเดตแล้ว",
"DialogControllerSettingsModifiedConfirmSubMessage": "คุณต้องการบันทึกหรือไม่?",
"DialogLoadFileErrorMessage": "{0} ไฟล์เกิดข้อผิดพลาด: {1}",
- "DialogModAlreadyExistsMessage": "มีม็อดอยู่แล้ว",
+ "DialogModAlreadyExistsMessage": "มีม็อดนี้อยู่แล้ว",
"DialogModInvalidMessage": "ไดเร็กทอรีที่ระบุไม่มี ม็อดอยู่!",
"DialogModDeleteNoParentMessage": "ไม่สามารถลบ: ไม่พบไดเร็กทอรีหลักสำหรับ ม็อด \"{0}\"!",
"DialogDlcNoDlcErrorMessage": "ไฟล์ที่ระบุไม่มี DLC สำหรับชื่อที่เลือก!",
@@ -508,7 +514,7 @@
"DialogLoadAppGameAlreadyLoadedSubMessage": "โปรดหยุดการจำลอง หรือปิดโปรแกรมจำลองก่อนที่จะเปิดเกมอื่น",
"DialogUpdateAddUpdateErrorMessage": "ไฟล์ที่ระบุไม่มีการอัพเดตสำหรับชื่อเรื่องที่เลือก!",
"DialogSettingsBackendThreadingWarningTitle": "คำเตือน - การทำเธรดแบ็กเอนด์",
- "DialogSettingsBackendThreadingWarningMessage": "รียูจินซ์ ต้องรีสตาร์ทหลังจากเปลี่ยนตัวเลือกนี้จึงจะใช้งานได้อย่างสมบูรณ์ คุณอาจต้องปิดการใช้งาน มัลติเธรด ของไดรเวอร์ของคุณด้วยตนเองเมื่อใช้ รียูจินซ์ ทั้งนี้ขึ้นอยู่กับแพลตฟอร์มของคุณ",
+ "DialogSettingsBackendThreadingWarningMessage": "Ryujinx ต้องรีสตาร์ทหลังจากเปลี่ยนตัวเลือกนี้จึงจะใช้งานได้อย่างสมบูรณ์ คุณอาจต้องปิดการใช้งาน มัลติเธรด ของไดรเวอร์ของคุณด้วยตนเองเมื่อใช้ Ryujinx ทั้งนี้ขึ้นอยู่กับแพลตฟอร์มของคุณ",
"DialogModManagerDeletionWarningMessage": "คุณกำลังจะลบ ม็อด: {0}\n\nคุณแน่ใจหรือไม่ว่าต้องการดำเนินการต่อ?",
"DialogModManagerDeletionAllWarningMessage": "คุณกำลังจะลบม็อดทั้งหมดสำหรับชื่อนี้\n\nคุณแน่ใจหรือไม่ว่าต้องการดำเนินการต่อ?",
"SettingsTabGraphicsFeaturesOptions": "คุณสมบัติ",
@@ -521,26 +527,26 @@
"DialogProfileInvalidProfileNameErrorMessage": "ชื่อไฟล์ประกอบด้วยอักขระที่ไม่ถูกต้อง กรุณาลองอีกครั้ง",
"MenuBarOptionsPauseEmulation": "หยุดชั่วคราว",
"MenuBarOptionsResumeEmulation": "ดำเนินการต่อ",
- "AboutUrlTooltipMessage": "คลิกเพื่อเปิดเว็บไซต์ รียูจินซ์ บนเบราว์เซอร์เริ่มต้นของคุณ",
- "AboutDisclaimerMessage": "ทางผู้พัฒนาโปรแกรม รียูจินซ์ ไม่มีส่วนเกี่ยวข้องกับทางบริษัท Nintendo™\nหรือพันธมิตรใดๆ ทั้งสิ้น!",
+ "AboutUrlTooltipMessage": "คลิกเพื่อเปิดเว็บไซต์ Ryujinx บนเบราว์เซอร์เริ่มต้นของคุณ",
+ "AboutDisclaimerMessage": "ทางผู้พัฒนาโปรแกรม Ryujinx ไม่มีส่วนเกี่ยวข้องกับทางบริษัท Nintendo™\nหรือพันธมิตรใดๆ ทั้งสิ้น!",
"AboutAmiiboDisclaimerMessage": "AmiiboAPI (www.amiiboapi.com) ถูกใช้\nในการจำลอง อะมิโบ ของเรา",
- "AboutPatreonUrlTooltipMessage": "คลิกเพื่อเปิดหน้า เพทรีออน ของ รียูจินซ์ บนเบราว์เซอร์เริ่มต้นของคุณ",
- "AboutGithubUrlTooltipMessage": "คลิกเพื่อเปิดหน้า กิตฮับ ของ ริวจินซ์ บนเบราว์เซอร์เริ่มต้นของคุณ",
- "AboutDiscordUrlTooltipMessage": "คลิกเพื่อเปิดคำเชิญเข้าสู่เซิร์ฟเวอร์ ดิสคอร์ด ของ รียูจินซ์ บนเบราว์เซอร์เริ่มต้นของคุณ",
- "AboutTwitterUrlTooltipMessage": "คลิกเพื่อเปิดหน้าเพจ ทวิตเตอร์ ของ รียูจินซ์ บนเบราว์เซอร์เริ่มต้นของคุณ",
+ "AboutPatreonUrlTooltipMessage": "คลิกเพื่อเปิดหน้า Patreon ของ Ryujinx บนเบราว์เซอร์เริ่มต้นของคุณ",
+ "AboutGithubUrlTooltipMessage": "คลิกเพื่อเปิดหน้า Github ของ Ryujinx บนเบราว์เซอร์เริ่มต้นของคุณ",
+ "AboutDiscordUrlTooltipMessage": "คลิกเพื่อเปิดคำเชิญเข้าสู่เซิร์ฟเวอร์ Discord ของ Ryujinx บนเบราว์เซอร์เริ่มต้นของคุณ",
+ "AboutTwitterUrlTooltipMessage": "คลิกเพื่อเปิดหน้าเพจ Twitter ของ Ryujinx บนเบราว์เซอร์เริ่มต้นของคุณ",
"AboutRyujinxAboutTitle": "เกี่ยวกับ:",
- "AboutRyujinxAboutContent": "รียูจินซ์ เป็นอีมูเลเตอร์สำหรับ Nintendo Switch™\nโปรดสนับสนุนเราบน เพทรีออน\nรับข่าวสารล่าสุดทั้งหมดบน ทวิตเตอร์ หรือ ดิสคอร์ด ของเรา\nนักพัฒนาที่สนใจจะมีส่วนร่วมสามารถดูข้อมูลเพิ่มเติมได้ที่ กิตฮับ หรือ ดิสคอร์ด ของเรา",
- "AboutRyujinxMaintainersTitle": "ได้รับการดูแลรักษาโดย:",
- "AboutRyujinxMaintainersContentTooltipMessage": "คลิกเพื่อเปิดหน้าผู้ร่วมให้ข้อมูลในเบราว์เซอร์เริ่มต้นของคุณ",
- "AboutRyujinxSupprtersTitle": "ลายนามผู้สนับสนุนบน เพทรีออน:",
- "AmiiboSeriesLabel": "อะมิโบซีรีส์",
+ "AboutRyujinxAboutContent": "Ryujinx เป็นอีมูเลเตอร์สำหรับ Nintendo Switch™\nโปรดสนับสนุนเราบน Patreon\nรับข่าวสารล่าสุดทั้งหมดบน Twitter หรือ Discord ของเรา\nนักพัฒนาที่สนใจจะมีส่วนร่วมสามารถดูข้อมูลเพิ่มเติมได้ที่ GitHub หรือ Discord ของเรา",
+ "AboutRyujinxMaintainersTitle": "ได้รับการดูแลโดย:",
+ "AboutRyujinxMaintainersContentTooltipMessage": "คลิกเพื่อเปิดหน้าผู้มีส่วนร่วมบนเบราว์เซอร์เริ่มต้นของคุณ",
+ "AboutRyujinxSupprtersTitle": "ผู้สนับสนุนบน Patreon:",
+ "AmiiboSeriesLabel": "Amiibo Series",
"AmiiboCharacterLabel": "ตัวละคร",
"AmiiboScanButtonLabel": "สแกนเลย",
- "AmiiboOptionsShowAllLabel": "แสดง อะมิโบ ทั้งหมด",
- "AmiiboOptionsUsRandomTagLabel": "แฮ็ค: ใช้แท็กสุ่ม Uuid",
+ "AmiiboOptionsShowAllLabel": "แสดง Amiibo ทั้งหมด",
+ "AmiiboOptionsUsRandomTagLabel": "แฮ็ค: สุ่มแท็ก Uuid",
"DlcManagerTableHeadingEnabledLabel": "เปิดใช้งานแล้ว",
"DlcManagerTableHeadingTitleIdLabel": "ชื่อไอดี",
- "DlcManagerTableHeadingContainerPathLabel": "ที่เก็บไฟล์ คอนเทนเนอร์",
+ "DlcManagerTableHeadingContainerPathLabel": "คอนเทนเนอร์เก็บไฟล์",
"DlcManagerTableHeadingFullPathLabel": "ที่เก็บไฟล์แบบเต็ม",
"DlcManagerRemoveAllButton": "ลบทั้งหมด",
"DlcManagerEnableAllButton": "เปิดใช้งานทั้งหมด",
@@ -555,44 +561,48 @@
"OrderDescending": "จากมากไปน้อย",
"SettingsTabGraphicsFeatures": "คุณสมบัติ และ การเพิ่มประสิทธิภาพ",
"ErrorWindowTitle": "หน้าต่างแสดงข้อผิดพลาด",
- "ToggleDiscordTooltip": "เลือกว่าจะแสดง รียูจินซ์ ในกิจกรรม ดิสคอร์ด \"ที่กำลังเล่นอยู่\" ของคุณหรือไม่?",
+ "ToggleDiscordTooltip": "เลือกว่าจะแสดง Ryujinx ในกิจกรรม Discord \"ที่กำลังเล่นอยู่\" ของคุณหรือไม่?",
"AddGameDirBoxTooltip": "ป้อนไดเรกทอรี่เกมที่จะทำการเพิ่มลงในรายการ",
"AddGameDirTooltip": "เพิ่มไดเรกทอรี่เกมลงในรายการ",
"RemoveGameDirTooltip": "ลบไดเรกทอรี่เกมที่เลือก",
+ "AddAutoloadDirBoxTooltip": "ป้อนไดเร็กทอรีสำหรับโหลดอัตโนมัติเพื่อเพิ่มลงในรายการ",
+ "AddAutoloadDirTooltip": "ป้อนไดเร็กทอรีสำหรับโหลดอัตโนมัติเพื่อเพิ่มลงในรายการ",
+ "RemoveAutoloadDirTooltip": "ลบไดเรกทอรีสำหรับโหลดอัตโนมัติที่เลือก",
"CustomThemeCheckTooltip": "ใช้ธีม Avalonia แบบกำหนดเองสำหรับ GUI เพื่อเปลี่ยนรูปลักษณ์ของเมนูโปรแกรมจำลอง",
"CustomThemePathTooltip": "ไปยังที่เก็บไฟล์ธีม GUI แบบกำหนดเอง",
"CustomThemeBrowseTooltip": "เรียกดูธีม GUI ที่กำหนดเอง",
- "DockModeToggleTooltip": "ด็อกโหมด ทำให้ระบบจำลองการทำงานเสมือน Nintendo ที่กำลังเชื่อมต่ออยู่ด็อก สิ่งนี้จะปรับปรุงความเสถียรภาพของกราฟิกในเกมส่วนใหญ่ ในทางกลับกัน การปิดใช้จะทำให้ระบบจำลองทำงานเหมือนกับ Nintendo Switch แบบพกพา ส่งผลให้คุณภาพกราฟิกลดลง\n\nกำหนดค่าส่วนควบคุมของผู้เล่น 1 หากวางแผนที่จะใช้ด็อกโหมด กำหนดค่าการควบคุมแบบ แฮนด์เฮลด์ หากวางแผนที่จะใช้โหมดแฮนด์เฮลด์\n\nเปิดทิ้งไว้หากคุณไม่แน่ใจ",
- "DirectKeyboardTooltip": "รองรับการเข้าถึงแป้นพิมพ์โดยตรง (HID) ให้เกมเข้าถึงคีย์บอร์ดของคุณเป็นอุปกรณ์ป้อนข้อความ\n\nใช้งานได้กับเกมที่รองรับการใช้งานคีย์บอร์ดบนฮาร์ดแวร์ของ Switch เท่านั้น\n\nหากคุณไม่แน่ใจปล่อยให้ปิดอย่างนั้น",
- "DirectMouseTooltip": "รองรับการเข้าถึงเมาส์โดยตรง (HID) ให้เกมเข้าถึงเมาส์ของคุณเป็นอุปกรณ์ชี้ตำแหน่ง\n\nใช้งานได้เฉพาะกับเกมที่รองรับการควบคุมเมาส์บนฮาร์ดแวร์ของ Switch เท่านั้น ซึ่งมีอยู่ไม่มากนัก\n\nเมื่อเปิดใช้งาน ฟังก์ชั่นหน้าจอสัมผัสอาจไม่ทำงาน\n\nหากคุณไม่แน่ใจปล่อยให้ปิดอย่างนั้น",
+ "DockModeToggleTooltip": "ด็อกโหมด ทำให้ระบบจำลองการทำงานเสมือน Nintendo ที่กำลังเชื่อมต่ออยู่ด็อก สิ่งนี้จะปรับปรุงความเสถียรภาพของกราฟิกในเกมส่วนใหญ่ ในทางกลับกัน การปิดใช้จะทำให้ระบบจำลองทำงานเหมือนกับ Nintendo Switch แบบพกพา ส่งผลให้คุณภาพกราฟิกลดลง\n\nแนะนำกำหนดค่าควบคุมของผู้เล่น 1 หากวางแผนที่จะใช้ด็อกโหมด กำหนดค่าการควบคุมแบบ แฮนด์เฮลด์ หากวางแผนที่จะใช้โหมดแฮนด์เฮลด์\n\nเปิดทิ้งไว้หากคุณไม่แน่ใจ",
+ "DirectKeyboardTooltip": "รองรับการเข้าถึงแป้นพิมพ์โดยตรง (HID) ให้เกมเข้าถึงคีย์บอร์ดของคุณเป็นอุปกรณ์ป้อนข้อความ\n\nใช้งานได้กับเกมที่รองรับการใช้งานคีย์บอร์ดบนฮาร์ดแวร์ของ Switch เท่านั้น\n\nหากคุณไม่แน่ใจให้ปิดใช้งานไว้",
+ "DirectMouseTooltip": "รองรับการเข้าถึงเมาส์โดยตรง (HID) ให้เกมเข้าถึงเมาส์ของคุณเป็นอุปกรณ์ชี้ตำแหน่ง\n\nใช้งานได้เฉพาะกับเกมที่รองรับการควบคุมเมาส์บนฮาร์ดแวร์ของ Switch เท่านั้น ซึ่งมีอยู่ไม่มากนัก\n\nเมื่อเปิดใช้งาน ฟังก์ชั่นหน้าจอสัมผัสอาจไม่ทำงาน\n\nหากคุณไม่แน่ใจให้ปิดใช้งานไว้",
"RegionTooltip": "เปลี่ยนภูมิภาคของระบบ",
"LanguageTooltip": "เปลี่ยนภาษาของระบบ",
"TimezoneTooltip": "เปลี่ยนโซนเวลาของระบบ",
"TimeTooltip": "เปลี่ยนเวลาของระบบ",
- "VSyncToggleTooltip": "Vertical Sync ของคอนโซลจำลอง โดยพื้นฐานแล้วเป็นตัวจำกัดเฟรมสำหรับเกมส่วนใหญ่ การปิดใช้งานอาจทำให้เกมทำงานด้วยความเร็วสูงขึ้น หรือทำให้หน้าจอการโหลดใช้เวลานานขึ้นหรือค้าง\n\nสามารถสลับได้ในเกมด้วยปุ่มลัดตามที่คุณต้องการ (F1 เป็นค่าเริ่มต้น) เราขอแนะนำให้ทำเช่นนี้หากคุณวางแผนที่จะปิดการใช้งาน\n\nหากคุณไม่แน่ใจให้ปล่อยไว้อย่างนั้น",
- "PptcToggleTooltip": "บันทึกฟังก์ชั่น JIT ที่แปลแล้ว ดังนั้นจึงไม่จำเป็นต้องแปลทุกครั้งที่โหลดเกม\n\nลดอาการกระตุกและเร่งความเร็วการบูตได้อย่างมากหลังจากการบูตครั้งแรกของเกม\n\nปล่อยไว้หากคุณไม่แน่ใจ",
- "LowPowerPptcToggleTooltip": "Load the PPTC using a third of the amount of cores.",
- "FsIntegrityToggleTooltip": "ตรวจสอบไฟล์ที่เสียหายเมื่อบูตเกม และหากตรวจพบไฟล์ที่เสียหาย จะแสดงข้อผิดพลาดของแฮชในบันทึก\n\nไม่มีผลกระทบต่อประสิทธิภาพการทำงานและมีไว้เพื่อช่วยในการแก้ไขปัญหา\n\nปล่อยไว้หากคุณไม่แน่ใจ",
- "AudioBackendTooltip": "เปลี่ยนแบ็กเอนด์ที่ใช้ในการเรนเดอร์เสียง\n\nSDL2 เป็นที่ต้องการ ในขณะที่ OpenAL และ SoundIO ถูกใช้เป็นทางเลือกสำรอง ดัมมี่จะไม่มีเสียง\n\nปล่อยไว้หากคุณไม่แน่ใจ",
- "MemoryManagerTooltip": "เปลี่ยนวิธีการแมปและเข้าถึงหน่วยความจำของผู้เยี่ยมชม ส่งผลอย่างมากต่อประสิทธิภาพการทำงานของ CPU ที่จำลอง\n\nตั้งค่าเป็น ไม่ทำการตรวจสอบ โฮสต์ หากคุณไม่แน่ใจ",
+ "VSyncToggleTooltip": "Vertical Sync ของคอนโซลจำลอง โดยพื้นฐานแล้วเป็นตัวจำกัดเฟรมสำหรับเกมส่วนใหญ่ การปิดใช้งานอาจทำให้เกมทำงานด้วยความเร็วสูงขึ้น หรือทำให้หน้าจอการโหลดใช้เวลานานขึ้นหรือค้าง\n\nสามารถสลับได้ในเกมด้วยปุ่มลัดตามที่คุณต้องการ (F1 เป็นค่าเริ่มต้น) เราขอแนะนำให้ทำเช่นนี้หากคุณวางแผนที่จะปิดการใช้งาน\n\nเปิดทิ้งไว้หากคุณไม่แน่ใจ",
+ "PptcToggleTooltip": "บันทึกฟังก์ชั่น JIT ที่แปลแล้ว ดังนั้นจึงไม่จำเป็นต้องแปลทุกครั้งที่โหลดเกม\n\nลดอาการกระตุกและเร่งความเร็วการบูตได้อย่างมากหลังจากการบูตครั้งแรกของเกม\n\nเปิดทิ้งไว้หากคุณไม่แน่ใจ",
+ "LowPowerPptcToggleTooltip": "โหลด PPTC โดยใช้หนึ่งในสามของจำนวนคอร์",
+ "FsIntegrityToggleTooltip": "ตรวจสอบไฟล์ที่เสียหายเมื่อบูตเกม และหากตรวจพบไฟล์ที่เสียหาย จะแสดงข้อผิดพลาดของแฮชในบันทึก\n\nไม่มีผลกระทบต่อประสิทธิภาพการทำงานและมีไว้เพื่อช่วยในการแก้ไขปัญหา\n\nเปิดทิ้งไว้หากคุณไม่แน่ใจ",
+ "AudioBackendTooltip": "เปลี่ยนแบ็กเอนด์ที่ใช้ในการเรนเดอร์เสียง\n\nแนะนำเป็น SDL2 ในขณะที่ OpenAL และ SoundIO ถูกใช้เป็นทางเลือกสำรอง ดัมมี่จะไม่มีเสียง\n\nตั้งค่าเป็น SDL2 หากคุณไม่แน่ใจ",
+ "MemoryManagerTooltip": "เปลี่ยนวิธีการเข้าถึงหน่วยความจำของผู้เยี่ยมชม ส่งผลอย่างมากต่อประสิทธิภาพการทำงานของ CPU ที่จำลอง\n\nตั้งค่าเป็น ไม่ได้ตรวจสอบโฮสต์ หากคุณไม่แน่ใจ",
"MemoryManagerSoftwareTooltip": "ใช้ตารางหน้าซอฟต์แวร์สำหรับการแปลที่อยู่ ความแม่นยำสูงสุดแต่ประสิทธิภาพช้าที่สุด",
- "MemoryManagerHostTooltip": "แมปหน่วยความจำในพื้นที่ที่อยู่โฮสต์โดยตรง การคอมไพล์และดำเนินการ JIT เร็วขึ้นมาก",
- "MemoryManagerUnsafeTooltip": "แมปหน่วยความจำโดยตรง แต่อย่าปิดบังที่อยู่ภายในพื้นที่ที่อยู่ของผู้เยี่ยมชมก่อนที่จะเข้าถึง เร็วกว่า แต่ต้องแลกกับความปลอดภัย แอปพลิเคชั่นผู้เยี่ยมชมสามารถเข้าถึงหน่วยความจำได้จากทุกที่ใน รียูจินซ์ ดังนั้นให้รันเฉพาะโปรแกรมที่คุณเชื่อถือในโหมดนี้",
+ "MemoryManagerHostTooltip": "แมปหน่วยความจำในพื้นที่ที่อยู่โฮสต์โดยตรง การคอมไพล์และดำเนินการของ JIT เร็วขึ้นมาก",
+ "MemoryManagerUnsafeTooltip": "แมปหน่วยความจำโดยตรง แต่อย่าตั้งค่าที่อยู่ของผู้เยี่ยมชมก่อนที่จะเข้าถึง เร็วกว่า แต่ต้องแลกกับความปลอดภัย แอปพลิเคชั่นของผู้เยี่ยมชมสามารถเข้าถึงหน่วยความจำได้จากทุกที่ใน Ryujinx แนะนำให้รันเฉพาะโปรแกรมที่คุณเชื่อถือในโหมดนี้",
"UseHypervisorTooltip": "ใช้ Hypervisor แทน JIT ปรับปรุงประสิทธิภาพอย่างมากเมื่อพร้อมใช้งาน แต่อาจไม่เสถียรในสถานะปัจจุบัน",
- "DRamTooltip": "ใช้เค้าโครง MemoryMode ทางเลือกเพื่อเลียนแบบโมเดลการพัฒนาสวิตช์\n\nสิ่งนี้มีประโยชน์สำหรับแพ็กพื้นผิวที่มีความละเอียดสูงกว่าหรือม็อดที่มีความละเอียด 4k เท่านั้น ไม่ปรับปรุงประสิทธิภาพ\n\nปล่อยให้ปิดหากคุณไม่แน่ใจ",
- "IgnoreMissingServicesTooltip": "ละเว้นบริการ Horizon OS ที่ยังไม่ได้ใช้งาน วิธีนี้อาจช่วยในการหลีกเลี่ยงข้อผิดพลาดเมื่อบู๊ตเกมบางเกม\n\nปล่อยให้ปิดหากคุณไม่แน่ใจ",
- "GraphicsBackendThreadingTooltip": "ดำเนินการคำสั่งแบ็กเอนด์กราฟิกบนเธรดที่สอง\n\nเร่งความเร็วการคอมไพล์เชเดอร์ ลดการกระตุก และปรับปรุงประสิทธิภาพการทำงานของไดรเวอร์ GPU โดยไม่ต้องรองรับมัลติเธรดในตัว ประสิทธิภาพที่ดีขึ้นเล็กน้อยสำหรับไดรเวอร์ที่มีมัลติเธรด\n\nตั้งเป็น อัตโนมัติ หากคุณไม่แน่ใจ",
+ "DRamTooltip": "ใช้รูปแบบ MemoryMode ทางเลือกเพื่อเลียนแบบโมเดลการพัฒนาสวิตช์\n\nสิ่งนี้มีประโยชน์สำหรับแพ็กพื้นผิวที่มีความละเอียดสูงกว่าหรือม็อดที่มีความละเอียด 4k เท่านั้น\n\nปล่อยให้ปิดหากคุณไม่แน่ใจ",
+ "IgnoreMissingServicesTooltip": "ละเว้นบริการ Horizon OS ที่ยังไม่ได้ใช้งาน วิธีนี้อาจช่วยในการหลีกเลี่ยงข้อผิดพลาดเมื่อบูตเกมบางเกม\n\nปล่อยให้ปิดหากคุณไม่แน่ใจ",
+ "IgnoreAppletTooltip": "กล่องโต้ตอบภายนอก \"แอปเพล็ตตัวควบคุม\" จะไม่ปรากฏขึ้นหากแป้นเกมถูกตัดการเชื่อมต่อระหว่างการเล่นเกม จะไม่มีข้อความแจ้งให้ปิดกล่องโต้ตอบหรือตั้งค่าตัวควบคุมใหม่ เมื่อเชื่อมต่อคอนโทรลเลอร์ที่ตัดการเชื่อมต่อก่อนหน้านี้อีกครั้ง เกมจะดำเนินการต่อโดยอัตโนมัติ",
+ "GraphicsBackendThreadingTooltip": "ดำเนินการคำสั่งแบ็กเอนด์กราฟิกบนเธรดที่สอง\n\nเร่งความเร็วการคอมไพล์ ลดการกระตุก และปรับปรุงประสิทธิภาพการทำงานของไดรเวอร์ GPU โดยไม่ต้องรองรับมัลติเธรดในตัว ประสิทธิภาพที่ดีขึ้นเล็กน้อยสำหรับไดรเวอร์ที่มีมัลติเธรด\n\nตั้งเป็น อัตโนมัติ หากคุณไม่แน่ใจ",
"GalThreadingTooltip": "ดำเนินการคำสั่งแบ็กเอนด์กราฟิกบนเธรดที่สอง\n\nเร่งความเร็วการคอมไพล์เชเดอร์ ลดการกระตุก และปรับปรุงประสิทธิภาพการทำงานของไดรเวอร์ GPU โดยไม่ต้องรองรับมัลติเธรดในตัว ประสิทธิภาพที่ดีขึ้นเล็กน้อยสำหรับไดรเวอร์ที่มีมัลติเธรด\n\nตั้งเป็น อัตโนมัติ หากคุณไม่แน่ใจ",
- "ShaderCacheToggleTooltip": "บันทึกแคชเชเดอร์ของดิสก์ซึ่งช่วยลดการกระตุกในการรันครั้งต่อๆ ไป\n\nปล่อยไว้หากคุณไม่แน่ใจ",
+ "ShaderCacheToggleTooltip": "บันทึกแคชแสงเงาของดิสก์ซึ่งช่วยลดการกระตุกในการรันครั้งต่อๆ ไป\n\nเปิดทิ้งไว้หากคุณไม่แน่ใจ",
"ResolutionScaleTooltip": "คูณความละเอียดการเรนเดอร์ของเกม\n\nเกมบางเกมอาจไม่สามารถใช้งานได้และดูเป็นพิกเซลแม้ว่าความละเอียดจะเพิ่มขึ้นก็ตาม สำหรับเกมเหล่านั้น คุณอาจต้องค้นหาม็อดที่ลบรอยหยักของภาพหรือเพิ่มความละเอียดในการเรนเดอร์ภายใน หากต้องการใช้อย่างหลัง คุณอาจต้องเลือก Native\n\nตัวเลือกนี้สามารถเปลี่ยนแปลงได้ในขณะที่เกมกำลังทำงานอยู่โดยคลิก \"นำมาใช้\" ด้านล่าง คุณสามารถย้ายหน้าต่างการตั้งค่าไปด้านข้างและทดลองจนกว่าคุณจะพบรูปลักษณ์ที่คุณต้องการสำหรับเกม\n\nโปรดทราบว่า 4x นั้นเกินความจำเป็นสำหรับการตั้งค่าแทบทุกประเภท",
"ResolutionScaleEntryTooltip": "สเกลความละเอียดจุดทศนิยม เช่น 1.5 ไม่ใช่จำนวนเต็มของสเกล มีแนวโน้มที่จะก่อให้เกิดปัญหาหรือความผิดพลาดได้",
- "AnisotropyTooltip": "ระดับของการกรองแบบ Anisotropic ตั้งค่าเป็นอัตโนมัติเพื่อใช้ค่าที่เกมร้องขอ",
+ "AnisotropyTooltip": "ระดับของ Anisotropic ตั้งค่าเป็นอัตโนมัติเพื่อใช้ค่าพื้นฐานของเกม",
"AspectRatioTooltip": "อัตราส่วนภาพที่ใช้กับหน้าต่างตัวแสดงภาพ\n\nเปลี่ยนสิ่งนี้หากคุณใช้ตัวดัดแปลงอัตราส่วนกว้างยาวสำหรับเกมของคุณ ไม่เช่นนั้นกราฟิกจะถูกยืดออก\n\nทิ้งไว้ที่ 16:9 หากไม่แน่ใจ",
- "ShaderDumpPathTooltip": "ที่เก็บ ดัมพ์ไฟล์ พื้นผิวและแสงเงา",
- "FileLogTooltip": "บันทึก ประวัติคอนโซลลงในไฟล์บันทึกบนดิสก์ จะไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
+ "ShaderDumpPathTooltip": "ที่เก็บ ดัมพ์ไฟล์เชเดอร์",
+ "FileLogTooltip": "บันทึกประวัติคอนโซลลงในไฟล์บันทึก จะไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
"StubLogTooltip": "พิมพ์ข้อความประวัติในคอนโซล จะไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
"InfoLogTooltip": "พิมพ์ข้อความบันทึกข้อมูลในคอนโซล จะไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
- "WarnLogTooltip": "พิมพ์ข้อความประวัติแจ้งตือนในคอนโซล จะไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
+ "WarnLogTooltip": "พิมพ์ข้อความประวัติการเตือนในคอนโซล จะไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
"ErrorLogTooltip": "พิมพ์ข้อความบันทึกข้อผิดพลาดในคอนโซล จะไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
"TraceLogTooltip": "พิมพ์ข้อความประวัติการติดตามในคอนโซล ไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
"GuestLogTooltip": "พิมพ์ข้อความประวัติของผู้เยี่ยมชมในคอนโซล ไม่ส่งผลกระทบต่อประสิทธิภาพการทำงาน",
@@ -600,16 +610,18 @@
"FSAccessLogModeTooltip": "เปิดใช้งาน เอาต์พุตประวัติการเข้าถึง FS ไปยังคอนโซล โหมดที่เป็นไปได้คือ 0-3",
"DeveloperOptionTooltip": "โปรดใช้ด้วยความระมัดระวัง",
"OpenGlLogLevel": "จำเป็นต้องเปิดใช้งานระดับบันทึกที่เหมาะสม",
- "DebugLogTooltip": "พิมพ์ข้อความประวัติการแก้ไขข้อบกพร่องในคอนโซล\n\nใช้สิ่งนี้เฉพาะเมื่อได้รับคำแนะนำจากเจ้าหน้าที่โดยเฉพาะเท่านั้น เนื่องจากจะทำให้บันทึกอ่านยากและทำให้ประสิทธิภาพของโปรแกรมจำลองแย่ลง",
- "LoadApplicationFileTooltip": "เปิด File Explorer เพื่อเลือกไฟล์ที่เข้ากันได้กับ Switch ที่จะโหลด",
+ "DebugLogTooltip": "พิมพ์ข้อความประวัติการแก้ไขข้อบกพร่องในคอนโซล\n\nใช้สิ่งนี้เฉพาะเมื่อได้รับคำแนะนำจากผู้ดูแลเท่านั้น เนื่องจากจะทำให้บันทึกอ่านยากและทำให้ประสิทธิภาพของโปรแกรมจำลองแย่ลง",
+ "LoadApplicationFileTooltip": "เปิดตัวสำรวจไฟล์เพื่อเลือกไฟล์ที่เข้ากันได้กับ Switch ที่จะโหลด",
"LoadApplicationFolderTooltip": "เปิดตัวสำรวจไฟล์เพื่อเลือกไฟล์ที่เข้ากันได้กับ Switch ที่จะโหลด",
+ "LoadDlcFromFolderTooltip": "เปิดตัวสำรวจไฟล์เพื่อเลือกหนึ่งโฟลเดอร์ขึ้นไปเพื่อโหลด DLC จำนวนมาก",
+ "LoadTitleUpdatesFromFolderTooltip": "เปิดตัวสำรวจไฟล์เพื่อเลือกหนึ่งโฟลเดอร์ขึ้นไปเพื่อโหลดไฟล์อัปเดตจำนวนมาก",
"OpenRyujinxFolderTooltip": "เปิดโฟลเดอร์ระบบไฟล์ Ryujinx",
"OpenRyujinxLogsTooltip": "เปิดโฟลเดอร์ ที่เก็บไฟล์ประวัติ",
- "ExitTooltip": "ออกจากโปรแกรม รียูจินซ์",
+ "ExitTooltip": "ออกจากโปรแกรม Ryujinx",
"OpenSettingsTooltip": "เปิดหน้าต่างการตั้งค่า",
"OpenProfileManagerTooltip": "เปิดหน้าต่างตัวจัดการโปรไฟล์ผู้ใช้",
"StopEmulationTooltip": "หยุดการจำลองของเกมที่เปิดอยู่ในปัจจุบันและกลับไปยังการเลือกเกม",
- "CheckUpdatesTooltip": "ตรวจสอบการอัปเดตของ รียูจินซ์",
+ "CheckUpdatesTooltip": "ตรวจสอบอัปเดตของ Ryujinx",
"OpenAboutTooltip": "เปิดหน้าต่าง เกี่ยวกับ",
"GridSize": "ขนาดตาราง",
"GridSizeTooltip": "เปลี่ยนขนาด ของตาราง",
@@ -619,54 +631,56 @@
"AudioVolumeTooltip": "ปรับระดับเสียง",
"SettingsTabSystemEnableInternetAccess": "การเข้าถึงอินเทอร์เน็ตของผู้เยี่ยมชม/โหมด LAN",
"EnableInternetAccessTooltip": "อนุญาตให้แอปพลิเคชันจำลองเชื่อมต่ออินเทอร์เน็ต\n\nเกมที่มีโหมด LAN สามารถเชื่อมต่อระหว่างกันได้เมื่อเปิดใช้งานและระบบเชื่อมต่อกับจุดเชื่อมต่อเดียวกัน รวมถึงคอนโซลจริงด้วย\n\nไม่อนุญาตให้มีการเชื่อมต่อกับเซิร์ฟเวอร์ Nintendo อาจทำให้เกิดการหยุดทำงานในบางเกมที่พยายามเชื่อมต่ออินเทอร์เน็ต\n\nปล่อยให้ปิดหากคุณไม่แน่ใจ",
- "GameListContextMenuManageCheatToolTip": "ฟังชั่นจัดการสูตรโกง",
- "GameListContextMenuManageCheat": "จัดการสูตรโกง",
- "GameListContextMenuManageModToolTip": "จัดการ ม็อด",
- "GameListContextMenuManageMod": "จัดการ ม็อด",
+ "GameListContextMenuManageCheatToolTip": "ฟังก์ชั่นจัดการสูตรโกง",
+ "GameListContextMenuManageCheat": "ฟังก์ชั่นจัดการสูตรโกง",
+ "GameListContextMenuManageModToolTip": "ฟังก์ชั่นจัดการม็อด",
+ "GameListContextMenuManageMod": "ฟังก์ชั่นจัดการม็อด",
"ControllerSettingsStickRange": "ขอบเขต:",
- "DialogStopEmulationTitle": "รียูจินซ์ - หยุดการจำลอง",
+ "DialogStopEmulationTitle": "Ryujinx - หยุดการจำลอง",
"DialogStopEmulationMessage": "คุณแน่ใจหรือไม่ว่าต้องการหยุดการจำลองหรือไม่?",
- "SettingsTabCpu": "หน่วยประมวลผลกลาง",
+ "SettingsTabCpu": "ซีพียู",
"SettingsTabAudio": "เสียง",
"SettingsTabNetwork": "เครือข่าย",
"SettingsTabNetworkConnection": "การเชื่อมต่อเครือข่าย",
- "SettingsTabCpuCache": "ซีพียู แคช",
+ "SettingsTabCpuCache": "แคชซีพียู",
"SettingsTabCpuMemory": "โหมดซีพียู",
- "DialogUpdaterFlatpakNotSupportedMessage": "โปรดอัปเดต รียูจินซ์ ผ่านช่องทาง FlatHub",
+ "DialogUpdaterFlatpakNotSupportedMessage": "โปรดอัปเดต Ryujinx ผ่านช่องทาง FlatHub",
"UpdaterDisabledWarningTitle": "ปิดใช้งานการอัปเดตแล้ว!",
"ControllerSettingsRotate90": "หมุน 90 องศา ตามเข็มนาฬิกา",
"IconSize": "ขนาดไอคอน",
"IconSizeTooltip": "เปลี่ยนขนาดของไอคอนเกม",
"MenuBarOptionsShowConsole": "แสดง คอนโซล",
- "ShaderCachePurgeError": "เกิดข้อผิดพลาดในการล้างแคชเชเดอร์ {0}: {1}",
+ "ShaderCachePurgeError": "เกิดข้อผิดพลาดในการล้างแคชแสงเงา {0}: {1}",
"UserErrorNoKeys": "ไม่พบ คีย์",
"UserErrorNoFirmware": "ไม่พบ เฟิร์มแวร์",
"UserErrorFirmwareParsingFailed": "เกิดข้อผิดพลาดในการวิเคราะห์เฟิร์มแวร์",
"UserErrorApplicationNotFound": "ไม่พบ แอปพลิเคชัน",
"UserErrorUnknown": "ข้อผิดพลาดที่ไม่รู้จัก",
"UserErrorUndefined": "ข้อผิดพลาดที่ไม่ได้ระบุ",
- "UserErrorNoKeysDescription": "รียูจินซ์ ไม่พบไฟล์ 'prod.keys' ในเครื่องของคุณ",
- "UserErrorNoFirmwareDescription": "รียูจินซ์ ไม่พบ เฟิร์มแวร์ที่ติดตั้งไว้ในเครื่องของคุณ",
- "UserErrorFirmwareParsingFailedDescription": "รียูจินซ์ ไม่สามารถวิเคราะห์เฟิร์มแวร์ที่ให้มาได้ ซึ่งมักมีสาเหตุมาจากคีย์ที่ล้าสมัย",
- "UserErrorApplicationNotFoundDescription": "รียูจินซ์ ไม่พบแอปพลิเคชันที่ถูกต้องในที่เก็บไฟล์ที่กำหนด",
+ "UserErrorNoKeysDescription": "Ryujinx ไม่พบไฟล์ 'prod.keys' ในเครื่องของคุณ",
+ "UserErrorNoFirmwareDescription": "Ryujinx ไม่พบ เฟิร์มแวร์ที่ติดตั้งไว้ในเครื่องของคุณ",
+ "UserErrorFirmwareParsingFailedDescription": "Ryujinx ไม่สามารถวิเคราะห์เฟิร์มแวร์ที่ให้มาได้ ซึ่งมักมีสาเหตุมาจากคีย์ที่เก่าจนเกินไป",
+ "UserErrorApplicationNotFoundDescription": "Ryujinx ไม่พบแอปพลิเคชันที่ถูกต้องในที่เก็บไฟล์ที่กำหนด",
"UserErrorUnknownDescription": "เกิดข้อผิดพลาดที่ไม่รู้จัก!",
"UserErrorUndefinedDescription": "เกิดข้อผิดพลาดที่ไม่สามารถระบุได้! สิ่งนี้ไม่ควรเกิดขึ้น โปรดติดต่อผู้พัฒนา!",
"OpenSetupGuideMessage": "เปิดคู่มือการตั้งค่า",
"NoUpdate": "ไม่มีการอัปเดต",
"TitleUpdateVersionLabel": "เวอร์ชั่น {0}",
- "RyujinxInfo": "รียูจินซ์ – ข้อมูล",
- "RyujinxConfirm": "รียูจินซ์ - ยืนยัน",
+ "TitleBundledUpdateVersionLabel": "Bundled: เวอร์ชั่น {0}",
+ "TitleBundledDlcLabel": "Bundled:",
+ "RyujinxInfo": "Ryujinx – ข้อมูล",
+ "RyujinxConfirm": "Ryujinx - ยืนยัน",
"FileDialogAllTypes": "ทุกประเภท",
- "Never": "ไม่มี",
+ "Never": "ไม่ต้อง",
"SwkbdMinCharacters": "ต้องมีความยาวของตัวอักษรอย่างน้อย {0} ตัว",
"SwkbdMinRangeCharacters": "ต้องมีความยาวของตัวอักษร {0}-{1} ตัว",
- "SoftwareKeyboard": "ซอฟต์แวร์ ของคีย์บอร์ด",
+ "SoftwareKeyboard": "ซอฟต์แวร์คีย์บอร์ด",
"SoftwareKeyboardModeNumeric": "ต้องเป็น 0-9 หรือ '.' เท่านั้น",
- "SoftwareKeyboardModeAlphabet": "ต้องเป็นตัวอักษรที่ไม่ใช่ CJK เท่านั้น",
+ "SoftwareKeyboardModeAlphabet": "ต้องเป็นตัวอักษรที่ไม่ใช่ประเภท CJK เท่านั้น",
"SoftwareKeyboardModeASCII": "ต้องเป็นตัวอักษร ASCII เท่านั้น",
"ControllerAppletControllers": "คอนโทรลเลอร์ที่รองรับ:",
"ControllerAppletPlayers": "ผู้เล่น:",
- "ControllerAppletDescription": "การกำหนดค่าปัจจุบันของคุณไม่ถูกต้อง เปิดการตั้งค่าและกำหนดค่าอินพุตของคุณใหม่",
+ "ControllerAppletDescription": "การกำหนดค่าปัจจุบันของคุณไม่ถูกต้อง กรุณาเปิดการตั้งค่าและกำหนดค่าอินพุตของคุณใหม่",
"ControllerAppletDocked": "ตั้งค่าด็อกโหมด ควรปิดใช้งานการควบคุมแบบแฮนด์เฮลด์",
"UpdaterRenaming": "กำลังเปลี่ยนชื่อไฟล์เก่า...",
"UpdaterRenameFailed": "โปรแกรมอัปเดตไม่สามารถเปลี่ยนชื่อไฟล์ได้: {0}",
@@ -686,7 +700,7 @@
"OpenFileDialogTitle": "เลือกไฟล์ที่สนับสนุนเพื่อเปิด",
"OpenFolderDialogTitle": "เลือกโฟลเดอร์ที่มีเกมที่แตกไฟล์แล้ว",
"AllSupportedFormats": "รูปแบบที่รองรับทั้งหมด",
- "RyujinxUpdater": "อัปเดต รียูจินซ์",
+ "RyujinxUpdater": "ตัวอัปเดต Ryujinx",
"SettingsTabHotkeys": "ปุ่มลัดของคีย์บอร์ด",
"SettingsTabHotkeysHotkeys": "ปุ่มลัดของคีย์บอร์ด",
"SettingsTabHotkeysToggleVsyncHotkey": "สลับเป็น VSync:",
@@ -696,24 +710,31 @@
"SettingsTabHotkeysToggleMuteHotkey": "ปิดเสียง:",
"ControllerMotionTitle": "ตั้งค่าควบคุมการเคลื่อนไหว",
"ControllerRumbleTitle": "ตั้งค่าการสั่นไหว",
- "SettingsSelectThemeFileDialogTitle": "เลือกไฟล์ธีม",
+ "SettingsSelectThemeFileDialogTitle": "เลือกธีมไฟล์",
"SettingsXamlThemeFile": "ไฟล์ธีมรูปแบบ XAML",
"AvatarWindowTitle": "จัดการบัญชี - อวาต้า",
- "Amiibo": "อะมิโบ",
+ "Amiibo": "Amiibo",
"Unknown": "ไม่รู้จัก",
"Usage": "การใช้งาน",
- "Writable": "สามารถเขียนได้",
+ "Writable": "สามารถเขียนทับได้",
"SelectDlcDialogTitle": "เลือกไฟล์ DLC",
"SelectUpdateDialogTitle": "เลือกไฟล์อัพเดต",
"SelectModDialogTitle": "เลือกไดเรกทอรี Mods",
"UserProfileWindowTitle": "จัดการโปรไฟล์ผู้ใช้",
"CheatWindowTitle": "จัดการสูตรโกง",
- "DlcWindowTitle": "จัดการเนื้อหาที่ดาวน์โหลดได้สำหรับ {0} ({1})",
- "ModWindowTitle": "Manage Mods for {0} ({1})",
+ "DlcWindowTitle": "จัดการ DLC ที่ดาวน์โหลดได้สำหรับ {0} ({1})",
+ "ModWindowTitle": "จัดการม็อดที่ดาวน์โหลดได้สำหรับ {0} ({1})",
"UpdateWindowTitle": "จัดการอัปเดตหัวข้อ",
+ "UpdateWindowUpdateAddedMessage": "{0} อัพเดตที่เพิ่มมาใหม่",
+ "UpdateWindowBundledContentNotice": "แพ็คที่อัพเดตมาไม่สามารถลบทิ้งได้ สามารถปิดใช้งานได้เท่านั้น",
"CheatWindowHeading": "สูตรโกงมีให้สำหรับ {0} [{1}]",
- "BuildId": "รหัสบิวด์:",
- "DlcWindowHeading": "{0} เนื้อหาที่สามารถดาวน์โหลดได้",
+ "BuildId": "รหัสการสร้าง:",
+ "DlcWindowBundledContentNotice": "แพ็ค DLC ไม่สามารถลบทิ้งได้ สามารถปิดใช้งานได้เท่านั้น",
+ "DlcWindowHeading": "{0} DLC ที่สามารถดาวน์โหลดได้",
+ "DlcWindowDlcAddedMessage": "{0} DLC ใหม่ที่เพิ่มเข้ามา",
+ "AutoloadDlcAddedMessage": "{0} ใหม่ที่เพิ่มเข้ามา",
+ "AutoloadUpdateAddedMessage": "{0} อัพเดตใหม่ที่เพิ่มเข้ามา",
+ "AutoloadDlcAndUpdateAddedMessage": "{0} DLC ใหม่ที่เพิ่มเข้ามาและ {1} อัพเดตใหม่ที่เพิ่มเข้ามา",
"ModWindowHeading": "{0} ม็อด",
"UserProfilesEditProfile": "แก้ไขที่เลือกแล้ว",
"Cancel": "ยกเลิก",
@@ -729,19 +750,19 @@
"UserProfilesName": "ชื่อ:",
"UserProfilesUserId": "รหัสผู้ใช้:",
"SettingsTabGraphicsBackend": "กราฟิกเบื้องหลัง",
- "SettingsTabGraphicsBackendTooltip": "เลือกกราฟิกเบื้องหลังที่จะใช้ในโปรแกรมจำลอง\n\nโดยรวมแล้ว Vulkan นั้นดีกว่าสำหรับกราฟิกการ์ดรุ่นใหม่ทั้งหมด ตราบใดที่ไดรเวอร์ยังอัพเดทอยู่เสมอ Vulkan ยังมีคุณสมบัติการคอมไพล์เชเดอร์ที่เร็วขึ้น (ลดอาการกระตุก) ของผู้จำหน่าย GPU ทุกราย\n\nOpenGL อาจได้รับผลลัพธ์ที่ดีกว่าบน Nvidia GPU รุ่นเก่า, AMD GPU รุ่นเก่าบน Linux หรือบน GPU ที่มี VRAM ต่ำกว่า แม้ว่าการคอมไพล์เชเดอร์ จะทำให้อาการกระตุกมากขึ้นก็ตาม\n\nตั้งค่าเป็น Vulkan หากไม่แน่ใจ ตั้งค่าเป็น OpenGL หาก GPU ของคุณไม่รองรับ Vulkan แม้จะมีไดรเวอร์กราฟิกล่าสุดก็ตาม",
+ "SettingsTabGraphicsBackendTooltip": "เลือกกราฟิกเบื้องหลังที่จะใช้ในโปรแกรมจำลอง\n\nโดยรวมแล้ว Vulkan นั้นดีกว่าสำหรับการ์ดจอรุ่นใหม่ทั้งหมด ตราบใดที่ไดรเวอร์ยังอัพเดทอยู่เสมอ Vulkan ยังมีคุณสมบัติการคอมไพล์เชเดอร์ที่เร็วขึ้น(และลดอาการกระตุก) สำหรับ GPU อื่นๆทุกอัน\n\nOpenGL อาจได้รับผลลัพธ์ที่ดีกว่าบน Nvidia GPU รุ่นเก่า, AMD GPU รุ่นเก่าบน Linux หรือบน GPU ที่มี VRAM น้อย แม้ว่าการคอมไพล์เชเดอร์ จะทำให้อาการกระตุกมากขึ้นก็ตาม\n\nตั้งค่าเป็น Vulkan หากไม่แน่ใจ ตั้งค่าเป็น OpenGL หาก GPU ของคุณไม่รองรับ Vulkan แม้จะมีไดรเวอร์กราฟิกล่าสุดก็ตาม",
"SettingsEnableTextureRecompression": "เปิดใช้งาน การบีบอัดพื้นผิวอีกครั้ง",
- "SettingsEnableTextureRecompressionTooltip": "บีบอัดพื้นผิว ASTC เพื่อลดการใช้งาน VRAM\n\nเกมที่ใช้รูปแบบพื้นผิวนี้ ได้แก่ Astral Chain, Bayonetta 3, Fire Emblem Engage, Metroid Prime Remastered, Super Mario Bros. Wonder และ The Legend of Zelda: Tears of the Kingdom\n\nกราฟิกการ์ดที่มี 4 กิกะไบต์ VRAM หรือน้อยกว่ามีแนวโน้มที่จะให้แคชในบางจุดขณะเล่นเกมเหล่านี้\n\nเปิดใช้งานเฉพาะในกรณีที่ VRAM ของคุณใกล้หมดในเกมที่กล่าวมาข้างต้น ปล่อยให้ปิดหากไม่แน่ใจ",
+ "SettingsEnableTextureRecompressionTooltip": "บีบอัดพื้นผิว ASTC เพื่อลดการใช้งาน VRAM\n\nเกมที่ใช้รูปแบบพื้นผิวนี้ ได้แก่ Astral Chain, Bayonetta 3, Fire Emblem Engage, Metroid Prime Remastered, Super Mario Bros. Wonder และ The Legend of Zelda: Tears of the Kingdom\n\nการ์ดจอที่มี 4GiB VRAM หรือน้อยกว่ามีแนวโน้มที่จะพังในบางจุดขณะเล่นเกมเหล่านี้\n\nเปิดใช้งานเฉพาะในกรณีที่ VRAM ของคุณใกล้หมดในเกมที่กล่าวมาข้างต้น ปล่อยให้ปิดหากไม่แน่ใจ",
"SettingsTabGraphicsPreferredGpu": "GPU ที่ต้องการ",
- "SettingsTabGraphicsPreferredGpuTooltip": "เลือกกราฟิกการ์ดที่จะใช้กับแบ็กเอนด์กราฟิก Vulkan\n\nไม่ส่งผลต่อ GPU ที่ OpenGL จะใช้\n\nตั้งค่าเป็น GPU ที่ถูกตั้งค่าสถานะเป็น \"dGPU\" หากคุณไม่แน่ใจ หากไม่มีก็ปล่อยทิ้งไว้โดยไม่มีใครแตะต้องมัน",
- "SettingsAppRequiredRestartMessage": "จำเป็นต้องรีสตาร์ท รียูจินซ์",
+ "SettingsTabGraphicsPreferredGpuTooltip": "เลือกการ์ดจอที่จะใช้กับแบ็กเอนด์กราฟิก Vulkan\n\nไม่ส่งผลต่อ GPU ที่ OpenGL จะใช้\n\nตั้งค่าเป็น GPU ที่ถูกตั้งค่าสถานะเป็น \"dGPU\" ถ้าหากคุณไม่แน่ใจ ,หากไม่มีก็ปล่อยทิ้งไว้โดยไม่ต้องแตะต้องมัน",
+ "SettingsAppRequiredRestartMessage": "จำเป็นต้องรีสตาร์ท Ryujinx",
"SettingsGpuBackendRestartMessage": "การตั้งค่ากราฟิกเบื้องหลังหรือ GPU ได้รับการแก้ไขแล้ว สิ่งนี้จะต้องมีการรีสตาร์ทจึงจะสามารถใช้งานได้",
"SettingsGpuBackendRestartSubMessage": "คุณต้องการรีสตาร์ทตอนนี้หรือไม่?",
- "RyujinxUpdaterMessage": "คุณต้องการอัพเดต รียูจินซ์ เป็นเวอร์ชั่นล่าสุดหรือไม่?",
+ "RyujinxUpdaterMessage": "คุณต้องการอัพเดต Ryujinx เป็นเวอร์ชั่นล่าสุดหรือไม่?",
"SettingsTabHotkeysVolumeUpHotkey": "เพิ่มระดับเสียง:",
"SettingsTabHotkeysVolumeDownHotkey": "ลดระดับเสียง:",
"SettingsEnableMacroHLE": "เปิดใช้งาน มาโคร HLE",
- "SettingsEnableMacroHLETooltip": "การจำลองระดับสูงของโค้ดมาโคร GPU\n\nปรับปรุงประสิทธิภาพ แต่อาจทำให้เกิดข้อผิดพลาดด้านกราฟิกในบางเกม\n\nปล่อยไว้หากคุณไม่แน่ใจ",
+ "SettingsEnableMacroHLETooltip": "การจำลองระดับสูงของโค้ดมาโคร GPU\n\nปรับปรุงประสิทธิภาพ แต่อาจทำให้เกิดข้อผิดพลาดด้านกราฟิกในบางเกม\n\nเปิดทิ้งไว้หากคุณไม่แน่ใจ",
"SettingsEnableColorSpacePassthrough": "ทะลุผ่านพื้นที่สี",
"SettingsEnableColorSpacePassthroughTooltip": "สั่งให้แบ็กเอนด์ Vulkan ส่งผ่านข้อมูลสีโดยไม่ต้องระบุค่าของสี สำหรับผู้ใช้ที่มีการแสดงกระจายตัวของสี อาจส่งผลให้สีสดใสมากขึ้น โดยต้องแลกกับความถูกต้องของสี",
"VolumeShort": "ระดับเสียง",
@@ -757,15 +778,16 @@
"Recover": "กู้คืน",
"UserProfilesRecoverHeading": "พบบันทึกสำหรับบัญชีดังต่อไปนี้",
"UserProfilesRecoverEmptyList": "ไม่มีโปรไฟล์ที่สามารถกู้คืนได้",
- "GraphicsAATooltip": "ใช้การลดรอยหยักกับการเรนเดอร์เกม\n\nFXAA จะเบลอภาพส่วนใหญ่ ในขณะที่ SMAA จะพยายามค้นหาขอบหยักและปรับให้เรียบ\n\nไม่แนะนำให้ใช้ร่วมกับตัวกรองสเกล FSR\n\nตัวเลือกนี้สามารถเปลี่ยนแปลงได้ในขณะที่เกมกำลังทำงานอยู่โดยคลิก \"นำไปใช้\" ด้านล่าง คุณสามารถย้ายหน้าต่างการตั้งค่าไปด้านข้างและทดลองจนกว่าคุณจะพบรูปลักษณ์ที่คุณต้องการสำหรับเกม\n\nปล่อยไว้ที่ NONE หากไม่แน่ใจ",
+ "GraphicsAATooltip": "ใช้การลดรอยหยักกับการเรนเดอร์เกม\n\nFXAA จะเบลอภาพส่วนใหญ่ ในขณะที่ SMAA จะพยายามค้นหารอยหยักและปรับให้เรียบ\n\nไม่แนะนำให้ใช้ร่วมกับตัวกรองสเกล FSR\n\nตัวเลือกนี้สามารถเปลี่ยนแปลงได้ในขณะที่เกมกำลังทำงานอยู่โดยคลิก \"นำไปใช้\" ด้านล่าง คุณสามารถย้ายหน้าต่างการตั้งค่าไปด้านข้างและทดลองจนกว่าคุณจะพบรูปลักษณ์ที่คุณต้องการสำหรับเกม\n\nปล่อยไว้ที่ NONE หากไม่แน่ใจ",
"GraphicsAALabel": "ลดการฉีกขาดของภาพ:",
"GraphicsScalingFilterLabel": "ปรับขนาดตัวกรอง:",
"GraphicsScalingFilterTooltip": "เลือกตัวกรองสเกลที่จะใช้เมื่อใช้สเกลความละเอียด\n\nBilinear ทำงานได้ดีกับเกม 3D และเป็นตัวเลือกเริ่มต้นที่ปลอดภัย\n\nแนะนำให้ใช้เกมภาพพิกเซลที่ใกล้เคียงที่สุด\n\nFSR 1.0 เป็นเพียงตัวกรองความคมชัด ไม่แนะนำให้ใช้กับ FXAA หรือ SMAA\n\nตัวเลือกนี้สามารถเปลี่ยนแปลงได้ในขณะที่เกมกำลังทำงานอยู่โดยคลิก \"นำไปใช้\" ด้านล่าง คุณสามารถย้ายหน้าต่างการตั้งค่าไปด้านข้างและทดลองจนกว่าคุณจะพบรูปลักษณ์ที่คุณต้องการสำหรับเกม",
"GraphicsScalingFilterBilinear": "Bilinear",
- "GraphicsScalingFilterNearest": "Nearest",
+ "GraphicsScalingFilterNearest": "ใกล้สุด",
"GraphicsScalingFilterFsr": "FSR",
+ "GraphicsScalingFilterArea": "Area",
"GraphicsScalingFilterLevelLabel": "ระดับ",
- "GraphicsScalingFilterLevelTooltip": "ตั้งค่าระดับความคมชัด FSR 1.0 สูงกว่าจะคมชัดกว่า",
+ "GraphicsScalingFilterLevelTooltip": "ตั้งค่าระดับความคมชัด FSR 1.0 ยิ่งสูงกว่าจะยิ่งคมชัดกว่า",
"SmaaLow": "SMAA ต่ำ",
"SmaaMedium": "SMAA ปานกลาง",
"SmaaHigh": "SMAA สูง",
@@ -781,6 +803,6 @@
"SettingsTabNetworkMultiplayer": "ผู้เล่นหลายคน",
"MultiplayerMode": "โหมด:",
"MultiplayerModeTooltip": "เปลี่ยนโหมดผู้เล่นหลายคนของ LDN\n\nLdnMitm จะปรับเปลี่ยนฟังก์ชันการเล่นแบบไร้สาย/ภายใน จะให้เกมทำงานเหมือนกับว่าเป็น LAN ช่วยให้สามารถเชื่อมต่อภายในเครือข่ายเดียวกันกับอินสแตนซ์ Ryujinx อื่น ๆ และคอนโซล Nintendo Switch ที่ถูกแฮ็กซึ่งมีโมดูล ldn_mitm ติดตั้งอยู่\n\nผู้เล่นหลายคนต้องการให้ผู้เล่นทุกคนอยู่ในเกมเวอร์ชันเดียวกัน (เช่น Super Smash Bros. Ultimate v13.0.1 ไม่สามารถเชื่อมต่อกับ v13.0.0)\n\nปล่อยให้ปิดการใช้งานหากไม่แน่ใจ",
- "MultiplayerModeDisabled": "Disabled",
+ "MultiplayerModeDisabled": "ปิดใช้งาน",
"MultiplayerModeLdnMitm": "ldn_mitm"
}
diff --git a/src/Ryujinx/Assets/Locales/tr_TR.json b/src/Ryujinx/Assets/Locales/tr_TR.json
index 96c0fd61a..a31c8df6e 100644
--- a/src/Ryujinx/Assets/Locales/tr_TR.json
+++ b/src/Ryujinx/Assets/Locales/tr_TR.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Eksik Servisleri Görmezden Gel",
+ "SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "Grafikler",
"SettingsTabGraphicsAPI": "Grafikler API",
"SettingsTabGraphicsEnableShaderCache": "Shader Önbelleğini Etkinleştir",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "JIT yerine Hypervisor kullan. Uygun durumlarda performansı büyük oranda arttırır. Ancak şu anki halinde stabil durumda çalışmayabilir.",
"DRamTooltip": "Emüle edilen sistem hafızasını 4GiB'dan 6GiB'a yükseltir.\n\nBu seçenek yalnızca yüksek çözünürlük doku paketleri veya 4k çözünürlük modları için kullanılır. Performansı artırMAZ!\n\nEmin değilseniz devre dışı bırakın.",
"IgnoreMissingServicesTooltip": "Henüz programlanmamış Horizon işletim sistemi servislerini görmezden gelir. Bu seçenek belirli oyunların açılırken çökmesinin önüne geçmeye yardımcı olabilir.\n\nEmin değilseniz devre dışı bırakın.",
+ "IgnoreAppletTooltip": "Oyun sırasında oyun kumandasının bağlantısı kesilirse, harici \"Controller Applet\" iletişim kutusu görünmez. İletişim kutusunu kapatma veya yeni bir kumanda ayarlama isteği olmaz. Daha önce bağlantısı kesilen kumanda tekrar bağlandığında oyun otomatik olarak devam eder.",
"GraphicsBackendThreadingTooltip": "Grafik arka uç komutlarını ikinci bir iş parçacığında işletir.\n\nKendi multithreading desteği olmayan sürücülerde shader derlemeyi hızlandırıp performansı artırır. Multithreading desteği olan sürücülerde çok az daha iyi performans sağlar.\n\nEmin değilseniz Otomatik seçeneğine ayarlayın.",
"GalThreadingTooltip": "Grafik arka uç komutlarını ikinci bir iş parçacığında işletir.\n\nKendi multithreading desteği olmayan sürücülerde shader derlemeyi hızlandırıp performansı artırır. Multithreading desteği olan sürücülerde çok az daha iyi performans sağlar.\n\nEmin değilseniz Otomatik seçeneğine ayarlayın.",
"ShaderCacheToggleTooltip": "Sonraki çalışmalarda takılmaları engelleyen bir gölgelendirici disk önbelleğine kaydeder.",
diff --git a/src/Ryujinx/Assets/Locales/uk_UA.json b/src/Ryujinx/Assets/Locales/uk_UA.json
index 39270fe1d..5c8d6af5b 100644
--- a/src/Ryujinx/Assets/Locales/uk_UA.json
+++ b/src/Ryujinx/Assets/Locales/uk_UA.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ігнорувати відсутні служби",
+ "SettingsTabSystemIgnoreApplet": "Ігнорувати Аплет",
"SettingsTabGraphics": "Графіка",
"SettingsTabGraphicsAPI": "Графічний API",
"SettingsTabGraphicsEnableShaderCache": "Увімкнути кеш шейдерів",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "Використання гіпервізор замість JIT. Значно покращує продуктивність, коли доступний, але може бути нестабільним у поточному стані.",
"DRamTooltip": "Використовує альтернативний макет MemoryMode для імітації моделі розробки Switch.\n\nЦе корисно лише для пакетів текстур з вищою роздільною здатністю або модифікацій із роздільною здатністю 4K. НЕ покращує продуктивність.\n\nЗалиште вимкненим, якщо не впевнені.",
"IgnoreMissingServicesTooltip": "Ігнорує нереалізовані служби Horizon OS. Це може допомогти в обході збоїв під час завантаження певних ігор.\n\nЗалиште вимкненим, якщо не впевнені.",
+ "IgnoreAppletTooltip": "Зовнішнє діалогове вікно \"Аплет контролера\" не з’являтиметься, якщо геймпад буде від’єднано під час гри. Не буде запиту закрити діалогове вікно чи налаштувати новий контролер. Після повторного підключення раніше від’єднаного контролера гра автоматично відновиться.",
"GraphicsBackendThreadingTooltip": "Виконує команди графічного сервера в другому потоці.\n\nПрискорює компіляцію шейдерів, зменшує затримки та покращує продуктивність драйверів GPU без власної підтримки багатопоточності. Трохи краща продуктивність на драйверах з багатопотоковістю.\nВстановіть значення «Авто», якщо не впевнені",
"GalThreadingTooltip": "Виконує команди графічного сервера в другому потоці.\n\nПрискорює компіляцію шейдерів, зменшує затримки та покращує продуктивність драйверів GPU без власної підтримки багатопоточності. Трохи краща продуктивність на драйверах з багатопотоковістю.\n\nВстановіть значення «Авто», якщо не впевнені.",
"ShaderCacheToggleTooltip": "Зберігає кеш дискового шейдера, що зменшує затримки під час наступних запусків.\n\nЗалиште увімкненим, якщо не впевнені.",
diff --git a/src/Ryujinx/Assets/Locales/zh_CN.json b/src/Ryujinx/Assets/Locales/zh_CN.json
index a7d92354d..044da488d 100644
--- a/src/Ryujinx/Assets/Locales/zh_CN.json
+++ b/src/Ryujinx/Assets/Locales/zh_CN.json
@@ -10,7 +10,10 @@
"SettingsTabSystemUseHypervisor": "使用 Hypervisor 虚拟化",
"MenuBarFile": "文件(_F)",
"MenuBarFileOpenFromFile": "加载游戏文件(_L)",
+ "MenuBarFileOpenFromFileError": "未发现应用",
"MenuBarFileOpenUnpacked": "加载解包后的游戏(_U)",
+ "MenuBarFileLoadDlcFromFolder": "从文件夹加载DLC",
+ "MenuBarFileLoadTitleUpdatesFromFolder": "从文件夹加载游戏更新",
"MenuBarFileOpenEmuFolder": "打开 Ryujinx 系统目录",
"MenuBarFileOpenLogsFolder": "打开日志目录",
"MenuBarFileExit": "退出(_E)",
@@ -102,6 +105,7 @@
"SettingsTabGeneralHideCursorOnIdle": "自动隐藏",
"SettingsTabGeneralHideCursorAlways": "始终隐藏",
"SettingsTabGeneralGameDirectories": "游戏目录",
+ "SettingsTabGeneralAutoloadDirectories": "自动加载DLC/游戏更新目录",
"SettingsTabGeneralAdd": "添加",
"SettingsTabGeneralRemove": "删除",
"SettingsTabSystem": "系统",
@@ -151,6 +155,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "忽略缺失的服务",
+ "SettingsTabSystemIgnoreApplet": "忽略小程序",
"SettingsTabGraphics": "图形",
"SettingsTabGraphicsAPI": "图形 API",
"SettingsTabGraphicsEnableShaderCache": "启用着色器缓存",
@@ -409,6 +414,7 @@
"GameListContextMenuToggleFavorite": "收藏",
"GameListContextMenuToggleFavoriteToolTip": "切换游戏的收藏状态",
"SettingsTabGeneralTheme": "主题:",
+ "SettingsTabGeneralThemeAuto": "自动",
"SettingsTabGeneralThemeDark": "深色(暗黑)",
"SettingsTabGeneralThemeLight": "浅色(亮色)",
"ControllerSettingsConfigureGeneral": "配置",
@@ -559,6 +565,9 @@
"AddGameDirBoxTooltip": "输入要添加的游戏目录",
"AddGameDirTooltip": "添加游戏目录到列表中",
"RemoveGameDirTooltip": "移除选中的目录",
+ "AddAutoloadDirBoxTooltip": "输入需要添加到列表中的自动加载目录",
+ "AddAutoloadDirTooltip": "添加一个自动加载目录到列表中",
+ "RemoveAutoloadDirTooltip": "移除被选中的自动加载目录",
"CustomThemeCheckTooltip": "使用自定义的 Avalonia 主题作为模拟器菜单的外观",
"CustomThemePathTooltip": "自定义主题的目录",
"CustomThemeBrowseTooltip": "查找自定义主题",
@@ -571,7 +580,7 @@
"TimeTooltip": "更改系统时间",
"VSyncToggleTooltip": "模拟控制台的垂直同步,开启后会降低大部分游戏的帧率。关闭后,可以获得更高的帧率,但也可能导致游戏画面加载耗时更长或卡住。\n\n在游戏中可以使用热键进行切换(默认为 F1 键)。\n\n如果不确定,请保持开启状态。",
"PptcToggleTooltip": "缓存已编译的游戏指令,这样每次游戏加载时就无需重新编译。\n\n可以减少卡顿和启动时间,提高游戏响应速度。\n\n如果不确定,请保持开启状态。",
- "LowPowerPptcToggleTooltip": "Load the PPTC using a third of the amount of cores.",
+ "LowPowerPptcToggleTooltip": "使用三分之一的核心数加载PPTC.",
"FsIntegrityToggleTooltip": "启动游戏时检查游戏文件的完整性,并在日志中记录损坏的文件。\n\n对性能没有影响,用于排查故障。\n\n如果不确定,请保持开启状态。",
"AudioBackendTooltip": "更改音频处理引擎。\n\n推荐选择“SDL2”,另外“OpenAL”和“SoundIO”可以作为备选,选择“无”将没有声音。\n\n如果不确定,请设置为“SDL2”。",
"MemoryManagerTooltip": "更改模拟器内存映射和访问的方式,对模拟器 CPU 的性能影响很大。\n\n如果不确定,请设置为“跳过检查的本机映射”。",
@@ -581,6 +590,7 @@
"UseHypervisorTooltip": "使用 Hypervisor 虚拟机代替即时编译,在可用的情况下能大幅提高性能,但目前可能还不稳定。",
"DRamTooltip": "模拟 Switch 开发机的内存布局。\n\n不会提高性能,某些高清纹理包或 4k 分辨率 MOD 可能需要使用此选项。\n\n如果不确定,请保持关闭状态。",
"IgnoreMissingServicesTooltip": "开启后,游戏会忽略未实现的系统服务,从而继续运行。\n少部分新发布的游戏由于使用了新的未知系统服务,可能需要此选项来避免闪退。\n模拟器更新完善系统服务之后,则无需开启此选项。\n\n如果不确定,请保持关闭状态。",
+ "IgnoreAppletTooltip": "如果游戏手柄在游戏过程中断开连接,则不会出现外部对话框“控制器小程序”。不会提示关闭对话框或设置新控制器。一旦先前断开连接的控制器重新连接,游戏将自动恢复。",
"GraphicsBackendThreadingTooltip": "在第二个线程上执行图形引擎指令。\n\n可以加速着色器编译,减少卡顿,提高 GPU 的性能。\n\n如果不确定,请设置为“自动”。",
"GalThreadingTooltip": "在第二个线程上执行图形引擎指令。\n\n可以加速着色器编译,减少卡顿,提高 GPU 的性能。\n\n如果不确定,请设置为“自动”。",
"ShaderCacheToggleTooltip": "模拟器将已编译的着色器保存到硬盘,可以减少游戏再次渲染相同图形导致的卡顿。\n\n如果不确定,请保持开启状态。",
@@ -603,6 +613,8 @@
"DebugLogTooltip": "在控制台中显示调试日志。\n\n仅在特别需要时使用此功能,因为它会导致日志信息难以阅读,并降低模拟器性能。",
"LoadApplicationFileTooltip": "选择 Switch 游戏文件并加载",
"LoadApplicationFolderTooltip": "选择解包后的 Switch 游戏目录并加载",
+ "LoadDlcFromFolderTooltip": "打开文件资源管理器以选择一个或多个文件夹来批量加载DLC。",
+ "LoadTitleUpdatesFromFolderTooltip": "打开文件资源管理器以选择一个或多个文件夹来批量加载游戏更新。",
"OpenRyujinxFolderTooltip": "打开 Ryujinx 模拟器系统目录",
"OpenRyujinxLogsTooltip": "打开日志存放的目录",
"ExitTooltip": "退出 Ryujinx 模拟器",
@@ -654,6 +666,8 @@
"OpenSetupGuideMessage": "打开安装指南",
"NoUpdate": "无更新(或不加载游戏更新)",
"TitleUpdateVersionLabel": "游戏更新的版本 {0}",
+ "TitleBundledUpdateVersionLabel": "捆绑:版本 {0}",
+ "TitleBundledDlcLabel": "捆绑:",
"RyujinxInfo": "Ryujinx - 信息",
"RyujinxConfirm": "Ryujinx - 确认",
"FileDialogAllTypes": "全部类型",
@@ -711,10 +725,17 @@
"DlcWindowTitle": "管理 {0} ({1}) 的 DLC",
"ModWindowTitle": "管理 {0} ({1}) 的 MOD",
"UpdateWindowTitle": "游戏更新管理器",
+ "UpdateWindowUpdateAddedMessage": "{0} 个更新被添加",
+ "UpdateWindowBundledContentNotice": "捆绑的更新无法被移除,只可被禁用。",
"CheatWindowHeading": "适用于 {0} [{1}] 的金手指",
"BuildId": "游戏版本 ID:",
+ "DlcWindowBundledContentNotice": "捆绑的DLC无法被移除,只可被禁用。",
"DlcWindowHeading": "{0} 个 DLC",
- "ModWindowHeading": "{0} 个 MOD",
+ "DlcWindowDlcAddedMessage": "{0} 个DLC被添加",
+ "AutoloadDlcAddedMessage": "{0} 个DLC被添加",
+ "AutoloadUpdateAddedMessage": "{0} 个游戏更新被添加",
+ "AutoloadDlcAndUpdateAddedMessage": "{0} 个DLC和{1} 个游戏更新被添加",
+ "ModWindowHeading": "{0} Mod(s)",
"UserProfilesEditProfile": "编辑所选",
"Cancel": "取消",
"Save": "保存",
@@ -760,10 +781,11 @@
"GraphicsAATooltip": "抗锯齿是一种图形处理技术,用于减少图像边缘的锯齿状现象,使图像更加平滑。\n\nFXAA(快速近似抗锯齿)是一种性能开销相对较小的抗锯齿方法,但可能会使得整体图像看起来有些模糊。\n\nSMAA(增强型子像素抗锯齿)则更加精细,它会尝试找到锯齿边缘并平滑它们,相比 FXAA 有更好的图像质量,但性能开销可能会稍大一些。\n\n如果开启了 FSR(FidelityFX Super Resolution,超级分辨率锐画技术)来提高性能或图像质量,不建议再启用抗锯齿,因为它们会产生不必要的图形处理开销,或者相互之间效果不协调。\n\n在游戏运行时,通过点击下面的“应用”按钮可以使设置生效;你可以将设置窗口移开,并试验找到您喜欢的游戏画面效果。\n\n如果不确定,请保持为“无”。",
"GraphicsAALabel": "抗锯齿:",
"GraphicsScalingFilterLabel": "缩放过滤:",
- "GraphicsScalingFilterTooltip": "选择在分辨率缩放时将使用的缩放过滤器。\n\nBilinear(双线性过滤)对于3D游戏效果较好,是一个安全的默认选项。\n\nNearest(最近邻过滤)推荐用于像素艺术游戏。\n\nFSR(超级分辨率锐画)只是一个锐化过滤器,不推荐与 FXAA 或 SMAA 抗锯齿一起使用。\n\n在游戏运行时,通过点击下面的“应用”按钮可以使设置生效;你可以将设置窗口移开,并试验找到您喜欢的游戏画面效果。\n\n如果不确定,请保持为“Bilinear(双线性过滤)”。",
+ "GraphicsScalingFilterTooltip": "选择在分辨率缩放时将使用的缩放过滤器。\n\nBilinear(双线性过滤)对于3D游戏效果较好,是一个安全的默认选项。\n\nNearest(最近邻过滤)推荐用于像素艺术游戏。\n\nFSR(超级分辨率锐画)只是一个锐化过滤器,不推荐与 FXAA 或 SMAA 抗锯齿一起使用。\n\nArea(局部过滤),当渲染分辨率大于窗口实际分辨率,推荐该选项。该选项在渲染比例大于2.0的情况下,可以实现超采样的效果。\n\n在游戏运行时,通过点击下面的“应用”按钮可以使设置生效;你可以将设置窗口移开,并试验找到您喜欢的游戏画面效果。\n\n如果不确定,请保持为“Bilinear(双线性过滤)”。",
"GraphicsScalingFilterBilinear": "Bilinear(双线性过滤)",
"GraphicsScalingFilterNearest": "Nearest(最近邻过滤)",
"GraphicsScalingFilterFsr": "FSR(超级分辨率锐画技术)",
+ "GraphicsScalingFilterArea": "Area(局部过滤)",
"GraphicsScalingFilterLevelLabel": "等级",
"GraphicsScalingFilterLevelTooltip": "设置 FSR 1.0 的锐化等级,数值越高,图像越锐利。",
"SmaaLow": "SMAA 低质量",
diff --git a/src/Ryujinx/Assets/Locales/zh_TW.json b/src/Ryujinx/Assets/Locales/zh_TW.json
index b724a2697..bd1682262 100644
--- a/src/Ryujinx/Assets/Locales/zh_TW.json
+++ b/src/Ryujinx/Assets/Locales/zh_TW.json
@@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "忽略缺少的模擬器功能",
+ "SettingsTabSystemIgnoreApplet": "忽略小程式",
"SettingsTabGraphics": "圖形",
"SettingsTabGraphicsAPI": "圖形 API",
"SettingsTabGraphicsEnableShaderCache": "啟用著色器快取",
@@ -581,6 +582,7 @@
"UseHypervisorTooltip": "使用 Hypervisor 取代 JIT。使用時可大幅提高效能,但在目前狀態下可能不穩定。",
"DRamTooltip": "利用另一種 MemoryMode 配置來模仿 Switch 開發模式。\n\n這僅對高解析度紋理套件或 4K 解析度模組有用。不會提高效能。\n\n如果不確定,請保持關閉狀態。",
"IgnoreMissingServicesTooltip": "忽略未實現的 Horizon OS 服務。這可能有助於在啟動某些遊戲時避免崩潰。\n\n如果不確定,請保持關閉狀態。",
+ "IgnoreAppletTooltip": "如果遊戲手把在遊戲過程中斷開連接,則外部對話方塊「控制器小程式」將不會出現。不會提示關閉對話方塊或設定新控制器。一旦先前斷開的控制器重新連接,遊戲將自動恢復。",
"GraphicsBackendThreadingTooltip": "在第二個執行緒上執行圖形後端指令。\n\n在本身不支援多執行緒的 GPU 驅動程式上,可加快著色器編譯、減少卡頓並提高效能。在支援多執行緒的驅動程式上效能略有提升。\n\n如果不確定,請設定為自動。",
"GalThreadingTooltip": "在第二個執行緒上執行圖形後端指令。\n\n在本身不支援多執行緒的 GPU 驅動程式上,可加快著色器編譯、減少卡頓並提高效能。在支援多執行緒的驅動程式上效能略有提升。\n\n如果不確定,請設定為自動。",
"ShaderCacheToggleTooltip": "儲存磁碟著色器快取,減少後續執行時的卡頓。\n\n如果不確定,請保持開啟狀態。",
diff --git a/src/Ryujinx/Common/ApplicationHelper.cs b/src/Ryujinx/Common/ApplicationHelper.cs
index 4be9a1a01..43b69045c 100644
--- a/src/Ryujinx/Common/ApplicationHelper.cs
+++ b/src/Ryujinx/Common/ApplicationHelper.cs
@@ -68,7 +68,7 @@ namespace Ryujinx.Ava.Common
Logger.Warning?.Print(LogClass.Application, "No control file was found for this game. Using a dummy one instead. This may cause inaccuracies in some games.");
}
- Uid user = new((ulong)_accountManager.LastOpenedUser.UserId.High, (ulong)_accountManager.LastOpenedUser.UserId.Low);
+ Uid user = _accountManager.LastOpenedUser.UserId.ToLibHacUid();
result = _horizonClient.Fs.EnsureApplicationSaveData(out _, new ApplicationId(titleId), in control, in user);
if (result.IsFailure())
diff --git a/src/Ryujinx/Common/Locale/LocaleManager.cs b/src/Ryujinx/Common/Locale/LocaleManager.cs
index 5cd2428a8..3247a55f8 100644
--- a/src/Ryujinx/Common/Locale/LocaleManager.cs
+++ b/src/Ryujinx/Common/Locale/LocaleManager.cs
@@ -99,6 +99,9 @@ namespace Ryujinx.Ava.Common.Locale
_ => false
};
+ public static string FormatDynamicValue(LocaleKeys key, params object[] values)
+ => Instance.UpdateAndGetDynamicValue(key, values);
+
public string UpdateAndGetDynamicValue(LocaleKeys key, params object[] values)
{
_dynamicValues[key] = values;
@@ -127,9 +130,9 @@ namespace Ryujinx.Ava.Common.Locale
_localeLanguageCode = languageCode;
}
- foreach (var item in locale)
+ foreach ((LocaleKeys key, string val) in locale)
{
- _localeStrings[item.Key] = item.Value;
+ _localeStrings[key] = val;
}
OnPropertyChanged("Item");
@@ -150,11 +153,11 @@ namespace Ryujinx.Ava.Common.Locale
var strings = JsonHelper.Deserialize(languageJson, CommonJsonContext.Default.StringDictionary);
- foreach (var item in strings)
+ foreach ((string key, string val) in strings)
{
- if (Enum.TryParse(item.Key, out var key))
+ if (Enum.TryParse(key, out var localeKey))
{
- localeStrings[key] = item.Value;
+ localeStrings[localeKey] = val;
}
}
diff --git a/src/Ryujinx/Modules/Updater/Updater.cs b/src/Ryujinx/Modules/Updater/Updater.cs
index 2f0bd8b3b..ce826aef9 100644
--- a/src/Ryujinx/Modules/Updater/Updater.cs
+++ b/src/Ryujinx/Modules/Updater/Updater.cs
@@ -1,6 +1,7 @@
using Avalonia.Controls;
using Avalonia.Threading;
using FluentAvalonia.UI.Controls;
+using Gommon;
using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Tar;
using ICSharpCode.SharpZipLib.Zip;
@@ -761,49 +762,8 @@ namespace Ryujinx.Modules
}
}
- public static void CleanupUpdate()
- {
- foreach (string file in Directory.GetFiles(_homeDir, "*.ryuold", SearchOption.AllDirectories))
- {
- File.Delete(file);
- }
-
- // Migration: Delete old Ryujinx binary.
- // TODO: Remove this in a future update.
- if (!OperatingSystem.IsMacOS())
- {
- string[] oldRyuFiles = Directory.GetFiles(_homeDir, "Ryujinx.Ava*", SearchOption.TopDirectoryOnly);
- // Assume we are running the new one if the process path is not available.
- // This helps to prevent an infinite loop of restarts.
- string currentRyuName = Path.GetFileName(Environment.ProcessPath) ?? (OperatingSystem.IsWindows() ? "Ryujinx.exe" : "Ryujinx");
-
- string newRyuName = Path.Combine(_homeDir, currentRyuName.Replace(".Ava", ""));
- if (!currentRyuName.Contains("Ryujinx.Ava"))
- {
- foreach (string oldRyuFile in oldRyuFiles)
- {
- File.Delete(oldRyuFile);
- }
- }
- // Should we be running the old binary, start the new one if possible.
- else if (File.Exists(newRyuName))
- {
- ProcessStartInfo processStart = new(newRyuName)
- {
- UseShellExecute = true,
- WorkingDirectory = _homeDir,
- };
-
- foreach (string argument in CommandLineState.Arguments)
- {
- processStart.ArgumentList.Add(argument);
- }
-
- Process.Start(processStart);
-
- Environment.Exit(0);
- }
- }
- }
+ public static void CleanupUpdate() =>
+ Directory.GetFiles(_homeDir, "*.ryuold", SearchOption.AllDirectories)
+ .ForEach(File.Delete);
}
}
diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs
index b77e05c12..5087d5d82 100644
--- a/src/Ryujinx/Program.cs
+++ b/src/Ryujinx/Program.cs
@@ -1,7 +1,7 @@
-using ARMeilleure;
using Avalonia;
using Avalonia.Threading;
using DiscordRPC;
+using Gommon;
using Projektanker.Icons.Avalonia;
using Projektanker.Icons.Avalonia.FontAwesome;
using Projektanker.Icons.Avalonia.MaterialDesign;
@@ -23,6 +23,7 @@ using Ryujinx.UI.Common.Helper;
using Ryujinx.UI.Common.SystemInfo;
using System;
using System.IO;
+using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
@@ -38,7 +39,7 @@ namespace Ryujinx.Ava
public static bool UseHardwareAcceleration { get; private set; }
[LibraryImport("user32.dll", SetLastError = true)]
- public static partial int MessageBoxA(IntPtr hWnd, [MarshalAs(UnmanagedType.LPStr)] string text, [MarshalAs(UnmanagedType.LPStr)] string caption, uint type);
+ public static partial int MessageBoxA(nint hWnd, [MarshalAs(UnmanagedType.LPStr)] string text, [MarshalAs(UnmanagedType.LPStr)] string caption, uint type);
private const uint MbIconwarning = 0x30;
@@ -46,9 +47,10 @@ namespace Ryujinx.Ava
{
Version = ReleaseInformation.Version;
+
if (OperatingSystem.IsWindows() && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 17134))
{
- _ = MessageBoxA(IntPtr.Zero, "You are running an outdated version of Windows.\n\nRyujinx supports Windows 10 version 1803 and newer.\n", $"Ryujinx {Version}", MbIconwarning);
+ _ = MessageBoxA(nint.Zero, "You are running an outdated version of Windows.\n\nRyujinx supports Windows 10 version 1803 and newer.\n", $"Ryujinx {Version}", MbIconwarning);
}
PreviewerDetached = true;
@@ -74,14 +76,14 @@ namespace Ryujinx.Ava
EnableInputFocusProxy = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP") == "gamescope",
RenderingMode = UseHardwareAcceleration
? [X11RenderingMode.Glx, X11RenderingMode.Software]
- : [X11RenderingMode.Software],
+ : [X11RenderingMode.Software]
})
.With(new Win32PlatformOptions
{
WinUICompositionBackdropCornerRadius = 8.0f,
RenderingMode = UseHardwareAcceleration
? [Win32RenderingMode.AngleEgl, Win32RenderingMode.Software]
- : [Win32RenderingMode.Software],
+ : [Win32RenderingMode.Software]
});
private static void Initialize(string[] args)
@@ -103,8 +105,9 @@ namespace Ryujinx.Ava
Console.Title = $"Ryujinx Console {Version}";
// Hook unhandled exception and process exit events.
- AppDomain.CurrentDomain.UnhandledException += (sender, e) => ProcessUnhandledException(e.ExceptionObject as Exception, e.IsTerminating);
- AppDomain.CurrentDomain.ProcessExit += (sender, e) => Exit();
+ AppDomain.CurrentDomain.UnhandledException += (sender, e)
+ => ProcessUnhandledException(sender, e.ExceptionObject as Exception, e.IsTerminating);
+ AppDomain.CurrentDomain.ProcessExit += (_, _) => Exit();
// Setup base data directory.
AppDataManager.Initialize(CommandLineState.BaseDirPathArg);
@@ -189,7 +192,7 @@ namespace Ryujinx.Ava
}
}
- UseHardwareAcceleration = ConfigurationState.Instance.EnableHardwareAcceleration.Value;
+ UseHardwareAcceleration = ConfigurationState.Instance.EnableHardwareAcceleration;
// Check if graphics backend was overridden
if (CommandLineState.OverrideGraphicsBackend is not null)
@@ -226,7 +229,13 @@ namespace Ryujinx.Ava
Logger.Notice.Print(LogClass.Application, $"Ryujinx Version: {Version}");
SystemInfo.Gather().Print();
- Logger.Notice.Print(LogClass.Application, $"Logs Enabled: {(Logger.GetEnabledLevels().Count == 0 ? "" : string.Join(", ", Logger.GetEnabledLevels()))}");
+ var enabledLogLevels = Logger.GetEnabledLevels().ToArray();
+
+ Logger.Notice.Print(LogClass.Application, $"Logs Enabled: {
+ (enabledLogLevels.Length is 0
+ ? ""
+ : enabledLogLevels.JoinToString(", "))
+ }");
Logger.Notice.Print(LogClass.Application,
AppDataManager.Mode == AppDataManager.LaunchMode.Custom
@@ -234,21 +243,19 @@ namespace Ryujinx.Ava
: $"Launch Mode: {AppDataManager.Mode}");
}
- private static void ProcessUnhandledException(Exception ex, bool isTerminating)
+ private static void ProcessUnhandledException(object sender, Exception ex, bool isTerminating)
{
+ Logger.Log log = Logger.Error ?? Logger.Notice;
string message = $"Unhandled exception caught: {ex}";
-
- Logger.Error?.PrintMsg(LogClass.Application, message);
-
- if (Logger.Error == null)
- {
- Logger.Notice.PrintMsg(LogClass.Application, message);
- }
-
+
+ // ReSharper disable once ConstantConditionalAccessQualifier
+ if (sender?.GetType()?.AsPrettyString() is {} senderName)
+ log.Print(LogClass.Application, message, senderName);
+ else
+ log.PrintMsg(LogClass.Application, message);
+
if (isTerminating)
- {
Exit();
- }
}
public static void Exit()
diff --git a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
index 6eb9fff8b..d5c910629 100644
--- a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
+++ b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
@@ -9,6 +9,7 @@ using Ryujinx.HLE;
using Ryujinx.HLE.HOS.Applets;
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
using Ryujinx.HLE.UI;
+using Ryujinx.UI.Common.Configuration;
using System;
using System.Threading;
@@ -30,9 +31,12 @@ namespace Ryujinx.Ava.UI.Applet
public bool DisplayMessageDialog(ControllerAppletUIArgs args)
{
ManualResetEvent dialogCloseEvent = new(false);
-
+
bool okPressed = false;
+ if (ConfigurationState.Instance.IgnoreApplet)
+ return false;
+
Dispatcher.UIThread.InvokeAsync(async () =>
{
var response = await ControllerAppletDialog.ShowControllerAppletDialog(_parent, args);
@@ -66,9 +70,9 @@ namespace Ryujinx.Ava.UI.Applet
UserResult response = await ContentDialogHelper.ShowDeferredContentDialog(_parent,
title,
message,
- "",
+ string.Empty,
LocaleManager.Instance[LocaleKeys.DialogOpenSettingsWindowLabel],
- "",
+ string.Empty,
LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
(int)Symbol.Important,
deferEvent,
@@ -171,12 +175,12 @@ namespace Ryujinx.Ava.UI.Applet
{
Title = title,
WindowStartupLocation = WindowStartupLocation.CenterScreen,
- Width = 400,
+ Width = 400
};
object response = await msgDialog.Run();
- if (response != null && buttons != null && buttons.Length > 1 && (int)response != buttons.Length - 1)
+ if (response != null && buttons is { Length: > 1 } && (int)response != buttons.Length - 1)
{
showDetails = true;
}
diff --git a/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs b/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs
index 1fc3c9c3c..5ec7737ed 100644
--- a/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs
+++ b/src/Ryujinx/UI/Applet/AvaloniaDynamicTextInputHandler.cs
@@ -24,10 +24,13 @@ namespace Ryujinx.Ava.UI.Applet
public AvaloniaDynamicTextInputHandler(MainWindow parent)
{
_parent = parent;
-
- (_parent.InputManager.KeyboardDriver as AvaloniaKeyboardDriver).KeyPressed += AvaloniaDynamicTextInputHandler_KeyPressed;
- (_parent.InputManager.KeyboardDriver as AvaloniaKeyboardDriver).KeyRelease += AvaloniaDynamicTextInputHandler_KeyRelease;
- (_parent.InputManager.KeyboardDriver as AvaloniaKeyboardDriver).TextInput += AvaloniaDynamicTextInputHandler_TextInput;
+
+ if (_parent.InputManager.KeyboardDriver is AvaloniaKeyboardDriver avaloniaKeyboardDriver)
+ {
+ avaloniaKeyboardDriver.KeyPressed += AvaloniaDynamicTextInputHandler_KeyPressed;
+ avaloniaKeyboardDriver.KeyRelease += AvaloniaDynamicTextInputHandler_KeyRelease;
+ avaloniaKeyboardDriver.TextInput += AvaloniaDynamicTextInputHandler_TextInput;
+ }
_hiddenTextBox = _parent.HiddenTextBox;
@@ -44,7 +47,7 @@ namespace Ryujinx.Ava.UI.Applet
TextChangedEvent?.Invoke(text ?? string.Empty, _hiddenTextBox.SelectionStart, _hiddenTextBox.SelectionEnd, false);
}
- private void SelectionChanged(int selection)
+ private void SelectionChanged(int _)
{
TextChangedEvent?.Invoke(_hiddenTextBox.Text ?? string.Empty, _hiddenTextBox.SelectionStart, _hiddenTextBox.SelectionEnd, false);
}
@@ -112,10 +115,13 @@ namespace Ryujinx.Ava.UI.Applet
public void Dispose()
{
- (_parent.InputManager.KeyboardDriver as AvaloniaKeyboardDriver).KeyPressed -= AvaloniaDynamicTextInputHandler_KeyPressed;
- (_parent.InputManager.KeyboardDriver as AvaloniaKeyboardDriver).KeyRelease -= AvaloniaDynamicTextInputHandler_KeyRelease;
- (_parent.InputManager.KeyboardDriver as AvaloniaKeyboardDriver).TextInput -= AvaloniaDynamicTextInputHandler_TextInput;
-
+ if (_parent.InputManager.KeyboardDriver is AvaloniaKeyboardDriver avaloniaKeyboardDriver)
+ {
+ avaloniaKeyboardDriver.KeyPressed -= AvaloniaDynamicTextInputHandler_KeyPressed;
+ avaloniaKeyboardDriver.KeyRelease -= AvaloniaDynamicTextInputHandler_KeyRelease;
+ avaloniaKeyboardDriver.TextInput -= AvaloniaDynamicTextInputHandler_TextInput;
+ }
+
_textChangedSubscription?.Dispose();
_selectionStartChangedSubscription?.Dispose();
_selectionEndtextChangedSubscription?.Dispose();
diff --git a/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs b/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs
index 6b999b1f4..de9d10ddd 100644
--- a/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs
+++ b/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs
@@ -37,14 +37,9 @@ namespace Ryujinx.Ava.UI.Applet
public ControllerAppletDialog(MainWindow mainWindow, ControllerAppletUIArgs args)
{
- if (args.PlayerCountMin == args.PlayerCountMax)
- {
- PlayerCount = args.PlayerCountMin.ToString();
- }
- else
- {
- PlayerCount = $"{args.PlayerCountMin} - {args.PlayerCountMax}";
- }
+ PlayerCount = args.PlayerCountMin == args.PlayerCountMax
+ ? args.PlayerCountMin.ToString()
+ : $"{args.PlayerCountMin} - {args.PlayerCountMax}";
SupportsProController = (args.SupportedStyles & ControllerType.ProController) != 0;
SupportsLeftJoycon = (args.SupportedStyles & ControllerType.JoyconLeft) != 0;
diff --git a/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml.cs b/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml.cs
index 869656669..1c70a80ec 100644
--- a/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml.cs
+++ b/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml.cs
@@ -47,42 +47,37 @@ namespace Ryujinx.Ava.UI.Controls
LoadProfiles();
if (contentManager.GetCurrentFirmwareVersion() != null)
- {
- Task.Run(() =>
- {
- UserFirmwareAvatarSelectorViewModel.PreloadAvatars(contentManager, virtualFileSystem);
- });
- }
+ Task.Run(() => UserFirmwareAvatarSelectorViewModel.PreloadAvatars(contentManager, virtualFileSystem));
+
InitializeComponent();
}
public void GoBack()
{
if (ContentFrame.BackStack.Count > 0)
- {
ContentFrame.GoBack();
- }
LoadProfiles();
}
- public void Navigate(Type sourcePageType, object parameter)
- {
- ContentFrame.Navigate(sourcePageType, parameter);
- }
+ public void Navigate(Type sourcePageType, object parameter)
+ => ContentFrame.Navigate(sourcePageType, parameter);
- public static async Task Show(AccountManager ownerAccountManager, ContentManager ownerContentManager,
- VirtualFileSystem ownerVirtualFileSystem, HorizonClient ownerHorizonClient)
+ public static async Task Show(
+ AccountManager ownerAccountManager,
+ ContentManager ownerContentManager,
+ VirtualFileSystem ownerVirtualFileSystem,
+ HorizonClient ownerHorizonClient)
{
var content = new NavigationDialogHost(ownerAccountManager, ownerContentManager, ownerVirtualFileSystem, ownerHorizonClient);
ContentDialog contentDialog = new()
{
Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle],
- PrimaryButtonText = "",
- SecondaryButtonText = "",
- CloseButtonText = "",
+ PrimaryButtonText = string.Empty,
+ SecondaryButtonText = string.Empty,
+ CloseButtonText = string.Empty,
Content = content,
- Padding = new Thickness(0),
+ Padding = new Thickness(0)
};
contentDialog.Closed += (_, _) => content.ViewModel.Dispose();
@@ -160,14 +155,14 @@ namespace Ryujinx.Ava.UI.Controls
if (profile == null)
{
+ Dispatcher.UIThread.Post(Action);
+
+ return;
+
static async void Action()
{
await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance[LocaleKeys.DialogUserProfileDeletionWarningMessage]);
}
-
- Dispatcher.UIThread.Post(Action);
-
- return;
}
AccountManager.OpenUser(profile.UserId);
diff --git a/src/Ryujinx/UI/Helpers/BitmapArrayValueConverter.cs b/src/Ryujinx/UI/Helpers/BitmapArrayValueConverter.cs
index 42bd8d5a8..7b599a48b 100644
--- a/src/Ryujinx/UI/Helpers/BitmapArrayValueConverter.cs
+++ b/src/Ryujinx/UI/Helpers/BitmapArrayValueConverter.cs
@@ -13,19 +13,19 @@ namespace Ryujinx.Ava.UI.Helpers
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- if (value == null)
+ switch (value)
{
- return null;
+ case null:
+ return null;
+ case byte[] buffer when targetType == typeof(IImage):
+ {
+ MemoryStream mem = new(buffer);
+
+ return new Bitmap(mem);
+ }
+ default:
+ throw new NotSupportedException();
}
-
- if (value is byte[] buffer && targetType == typeof(IImage))
- {
- MemoryStream mem = new(buffer);
-
- return new Bitmap(mem);
- }
-
- throw new NotSupportedException();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
diff --git a/src/Ryujinx/UI/Helpers/ButtonKeyAssigner.cs b/src/Ryujinx/UI/Helpers/ButtonKeyAssigner.cs
index 4f2b8daae..2781a32b1 100644
--- a/src/Ryujinx/UI/Helpers/ButtonKeyAssigner.cs
+++ b/src/Ryujinx/UI/Helpers/ButtonKeyAssigner.cs
@@ -41,11 +41,7 @@ namespace Ryujinx.Ava.UI.Helpers
if (_isWaitingForInput)
{
- Dispatcher.UIThread.Post(() =>
- {
- Cancel();
- });
-
+ Dispatcher.UIThread.Post(() => Cancel());
return;
}
diff --git a/src/Ryujinx/UI/Helpers/ContentDialogHelper.cs b/src/Ryujinx/UI/Helpers/ContentDialogHelper.cs
index 19dd3fd33..a2c40c5b0 100644
--- a/src/Ryujinx/UI/Helpers/ContentDialogHelper.cs
+++ b/src/Ryujinx/UI/Helpers/ContentDialogHelper.cs
@@ -42,7 +42,7 @@ namespace Ryujinx.Ava.UI.Helpers
PrimaryButtonCommand = MiniCommand.Create(() =>
{
result = primaryButtonResult;
- }),
+ })
};
contentDialog.SecondaryButtonCommand = MiniCommand.Create(() =>
diff --git a/src/Ryujinx/UI/Helpers/GlyphValueConverter.cs b/src/Ryujinx/UI/Helpers/GlyphValueConverter.cs
index 1544d33ae..94c3ab35d 100644
--- a/src/Ryujinx/UI/Helpers/GlyphValueConverter.cs
+++ b/src/Ryujinx/UI/Helpers/GlyphValueConverter.cs
@@ -22,22 +22,11 @@ namespace Ryujinx.Ava.UI.Helpers
_key = key;
}
- public string this[string key]
- {
- get
- {
- if (_glyphs.TryGetValue(Enum.Parse(key), out var val))
- {
- return val;
- }
+ public string this[string key] =>
+ _glyphs.TryGetValue(Enum.Parse(key), out var val)
+ ? val
+ : string.Empty;
- return string.Empty;
- }
- }
-
- public override object ProvideValue(IServiceProvider serviceProvider)
- {
- return this[_key];
- }
+ public override object ProvideValue(IServiceProvider serviceProvider) => this[_key];
}
}
diff --git a/src/Ryujinx/UI/Helpers/LocalizedNeverConverter.cs b/src/Ryujinx/UI/Helpers/LocalizedNeverConverter.cs
deleted file mode 100644
index 337404233..000000000
--- a/src/Ryujinx/UI/Helpers/LocalizedNeverConverter.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using Avalonia.Data.Converters;
-using Avalonia.Markup.Xaml;
-using Ryujinx.Ava.Common.Locale;
-using Ryujinx.UI.Common.Helper;
-using System;
-using System.Globalization;
-
-namespace Ryujinx.Ava.UI.Helpers
-{
- ///
- /// This makes sure that the string "Never" that's returned by is properly localized in the Avalonia UI.
- /// After the Avalonia UI has been made the default and the GTK UI is removed, should be updated to directly return a localized string.
- ///
- // TODO: localize ValueFormatUtils.FormateDateTime
- internal class LocalizedNeverConverter : MarkupExtension, IValueConverter
- {
- private static readonly LocalizedNeverConverter _instance = new();
-
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is not string valStr)
- {
- return "";
- }
-
- if (valStr == "Never")
- {
- return LocaleManager.Instance[LocaleKeys.Never];
- }
-
- return valStr;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
-
- public override object ProvideValue(IServiceProvider serviceProvider)
- {
- return _instance;
- }
- }
-}
diff --git a/src/Ryujinx/UI/Helpers/LoggerAdapter.cs b/src/Ryujinx/UI/Helpers/LoggerAdapter.cs
index fc7145410..7982c17a6 100644
--- a/src/Ryujinx/UI/Helpers/LoggerAdapter.cs
+++ b/src/Ryujinx/UI/Helpers/LoggerAdapter.cs
@@ -1,5 +1,6 @@
using Avalonia.Logging;
using Avalonia.Utilities;
+using Gommon;
using Ryujinx.Common.Logging;
using System;
using System.Text;
@@ -90,7 +91,7 @@ namespace Ryujinx.Ava.UI.Helpers
if (source != null)
{
result.Append(" (");
- result.Append(source.GetType().Name);
+ result.Append(source.GetType().AsFullNamePrettyString());
result.Append(" #");
result.Append(source.GetHashCode());
result.Append(')');
diff --git a/src/Ryujinx/UI/Helpers/OffscreenTextBox.cs b/src/Ryujinx/UI/Helpers/OffscreenTextBox.cs
index dd736037e..dd9698918 100644
--- a/src/Ryujinx/UI/Helpers/OffscreenTextBox.cs
+++ b/src/Ryujinx/UI/Helpers/OffscreenTextBox.cs
@@ -35,7 +35,7 @@ namespace Ryujinx.Ava.UI.Helpers
{
Text = text,
Source = this,
- RoutedEvent = TextInputEvent,
+ RoutedEvent = TextInputEvent
});
}
}
diff --git a/src/Ryujinx/UI/Helpers/TimeZoneConverter.cs b/src/Ryujinx/UI/Helpers/TimeZoneConverter.cs
index 876d51f71..5edc6482e 100644
--- a/src/Ryujinx/UI/Helpers/TimeZoneConverter.cs
+++ b/src/Ryujinx/UI/Helpers/TimeZoneConverter.cs
@@ -9,20 +9,12 @@ namespace Ryujinx.Ava.UI.Helpers
{
public static TimeZoneConverter Instance = new();
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value == null)
- {
- return null;
- }
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ => value is TimeZone timeZone
+ ? $"{timeZone.UtcDifference} {timeZone.Location} {timeZone.Abbreviation}"
+ : null;
- var timeZone = (TimeZone)value;
- return string.Format("{0} {1} {2}", timeZone.UtcDifference, timeZone.Location, timeZone.Abbreviation);
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ => throw new NotImplementedException();
}
}
diff --git a/src/Ryujinx/UI/Helpers/Win32NativeInterop.cs b/src/Ryujinx/UI/Helpers/Win32NativeInterop.cs
index 01478cb3d..48f98f44a 100644
--- a/src/Ryujinx/UI/Helpers/Win32NativeInterop.cs
+++ b/src/Ryujinx/UI/Helpers/Win32NativeInterop.cs
@@ -35,23 +35,23 @@ namespace Ryujinx.Ava.UI.Helpers
}
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
- internal delegate IntPtr WindowProc(IntPtr hWnd, WindowsMessages msg, IntPtr wParam, IntPtr lParam);
+ internal delegate nint WindowProc(nint hWnd, WindowsMessages msg, nint wParam, nint lParam);
[StructLayout(LayoutKind.Sequential)]
public struct WndClassEx
{
public int cbSize;
public ClassStyles style;
- public IntPtr lpfnWndProc; // not WndProc
+ public nint lpfnWndProc; // not WndProc
public int cbClsExtra;
public int cbWndExtra;
- public IntPtr hInstance;
- public IntPtr hIcon;
- public IntPtr hCursor;
- public IntPtr hbrBackground;
- public IntPtr lpszMenuName;
- public IntPtr lpszClassName;
- public IntPtr hIconSm;
+ public nint hInstance;
+ public nint hIcon;
+ public nint hCursor;
+ public nint hbrBackground;
+ public nint lpszMenuName;
+ public nint lpszClassName;
+ public nint hIconSm;
public WndClassEx()
{
@@ -59,43 +59,43 @@ namespace Ryujinx.Ava.UI.Helpers
}
}
- public static IntPtr CreateEmptyCursor()
+ public static nint CreateEmptyCursor()
{
- return CreateCursor(IntPtr.Zero, 0, 0, 1, 1, new byte[] { 0xFF }, new byte[] { 0x00 });
+ return CreateCursor(nint.Zero, 0, 0, 1, 1, [0xFF], [0x00]);
}
- public static IntPtr CreateArrowCursor()
+ public static nint CreateArrowCursor()
{
- return LoadCursor(IntPtr.Zero, (IntPtr)Cursors.IdcArrow);
+ return LoadCursor(nint.Zero, (nint)Cursors.IdcArrow);
}
[LibraryImport("user32.dll")]
- public static partial IntPtr SetCursor(IntPtr handle);
+ public static partial nint SetCursor(nint handle);
[LibraryImport("user32.dll")]
- public static partial IntPtr CreateCursor(IntPtr hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, [In] byte[] pvAndPlane, [In] byte[] pvXorPlane);
+ public static partial nint CreateCursor(nint hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, [In] byte[] pvAndPlane, [In] byte[] pvXorPlane);
[LibraryImport("user32.dll", SetLastError = true, EntryPoint = "RegisterClassExW")]
public static partial ushort RegisterClassEx(ref WndClassEx param);
[LibraryImport("user32.dll", SetLastError = true, EntryPoint = "UnregisterClassW")]
- public static partial short UnregisterClass([MarshalAs(UnmanagedType.LPWStr)] string lpClassName, IntPtr instance);
+ public static partial short UnregisterClass([MarshalAs(UnmanagedType.LPWStr)] string lpClassName, nint instance);
[LibraryImport("user32.dll", EntryPoint = "DefWindowProcW")]
- public static partial IntPtr DefWindowProc(IntPtr hWnd, WindowsMessages msg, IntPtr wParam, IntPtr lParam);
+ public static partial nint DefWindowProc(nint hWnd, WindowsMessages msg, nint wParam, nint lParam);
[LibraryImport("kernel32.dll", EntryPoint = "GetModuleHandleA")]
- public static partial IntPtr GetModuleHandle([MarshalAs(UnmanagedType.LPStr)] string lpModuleName);
+ public static partial nint GetModuleHandle([MarshalAs(UnmanagedType.LPStr)] string lpModuleName);
[LibraryImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- public static partial bool DestroyWindow(IntPtr hwnd);
+ public static partial bool DestroyWindow(nint hwnd);
[LibraryImport("user32.dll", SetLastError = true, EntryPoint = "LoadCursorA")]
- public static partial IntPtr LoadCursor(IntPtr hInstance, IntPtr lpCursorName);
+ public static partial nint LoadCursor(nint hInstance, nint lpCursorName);
[LibraryImport("user32.dll", SetLastError = true, EntryPoint = "CreateWindowExW")]
- public static partial IntPtr CreateWindowEx(
+ public static partial nint CreateWindowEx(
uint dwExStyle,
[MarshalAs(UnmanagedType.LPWStr)] string lpClassName,
[MarshalAs(UnmanagedType.LPWStr)] string lpWindowName,
@@ -104,12 +104,12 @@ namespace Ryujinx.Ava.UI.Helpers
int y,
int nWidth,
int nHeight,
- IntPtr hWndParent,
- IntPtr hMenu,
- IntPtr hInstance,
- IntPtr lpParam);
+ nint hWndParent,
+ nint hMenu,
+ nint hInstance,
+ nint lpParam);
[LibraryImport("user32.dll", SetLastError = true)]
- public static partial IntPtr SetWindowLongPtrW(IntPtr hWnd, int nIndex, IntPtr value);
+ public static partial nint SetWindowLongPtrW(nint hWnd, int nIndex, nint value);
}
}
diff --git a/src/Ryujinx/UI/Models/StatusInitEventArgs.cs b/src/Ryujinx/UI/Models/StatusInitEventArgs.cs
deleted file mode 100644
index 4b08737e9..000000000
--- a/src/Ryujinx/UI/Models/StatusInitEventArgs.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-
-namespace Ryujinx.Ava.UI.Models
-{
- internal class StatusInitEventArgs : EventArgs
- {
- public string GpuBackend { get; }
- public string GpuName { get; }
-
- public StatusInitEventArgs(string gpuBackend, string gpuName)
- {
- GpuBackend = gpuBackend;
- GpuName = gpuName;
- }
- }
-}
diff --git a/src/Ryujinx/UI/Models/StatusUpdatedEventArgs.cs b/src/Ryujinx/UI/Models/StatusUpdatedEventArgs.cs
index ee5648faf..f12cf0aa6 100644
--- a/src/Ryujinx/UI/Models/StatusUpdatedEventArgs.cs
+++ b/src/Ryujinx/UI/Models/StatusUpdatedEventArgs.cs
@@ -10,8 +10,10 @@ namespace Ryujinx.Ava.UI.Models
public string DockedMode { get; }
public string FifoStatus { get; }
public string GameStatus { get; }
+
+ public uint ShaderCount { get; }
- public StatusUpdatedEventArgs(bool vSyncEnabled, string volumeStatus, string dockedMode, string aspectRatio, string gameStatus, string fifoStatus)
+ public StatusUpdatedEventArgs(bool vSyncEnabled, string volumeStatus, string dockedMode, string aspectRatio, string gameStatus, string fifoStatus, uint shaderCount)
{
VSyncEnabled = vSyncEnabled;
VolumeStatus = volumeStatus;
@@ -19,6 +21,7 @@ namespace Ryujinx.Ava.UI.Models
AspectRatio = aspectRatio;
GameStatus = gameStatus;
FifoStatus = fifoStatus;
+ ShaderCount = shaderCount;
}
}
}
diff --git a/src/Ryujinx/UI/Renderer/EmbeddedWindow.cs b/src/Ryujinx/UI/Renderer/EmbeddedWindow.cs
index 0930e7795..ea5a8dbdd 100644
--- a/src/Ryujinx/UI/Renderer/EmbeddedWindow.cs
+++ b/src/Ryujinx/UI/Renderer/EmbeddedWindow.cs
@@ -25,15 +25,15 @@ namespace Ryujinx.Ava.UI.Renderer
protected GLXWindow X11Window { get; set; }
- protected IntPtr WindowHandle { get; set; }
- protected IntPtr X11Display { get; set; }
- protected IntPtr NsView { get; set; }
- protected IntPtr MetalLayer { get; set; }
+ protected nint WindowHandle { get; set; }
+ protected nint X11Display { get; set; }
+ protected nint NsView { get; set; }
+ protected nint MetalLayer { get; set; }
public delegate void UpdateBoundsCallbackDelegate(Rect rect);
private UpdateBoundsCallbackDelegate _updateBoundsCallback;
- public event EventHandler WindowCreated;
+ public event EventHandler WindowCreated;
public event EventHandler BoundsChanged;
public EmbeddedWindow()
@@ -49,10 +49,10 @@ namespace Ryujinx.Ava.UI.Renderer
protected virtual void OnWindowDestroying()
{
- WindowHandle = IntPtr.Zero;
- X11Display = IntPtr.Zero;
- NsView = IntPtr.Zero;
- MetalLayer = IntPtr.Zero;
+ WindowHandle = nint.Zero;
+ X11Display = nint.Zero;
+ NsView = nint.Zero;
+ MetalLayer = nint.Zero;
}
private void OnNativeEmbeddedWindowCreated(object sender, EventArgs e)
@@ -139,7 +139,7 @@ namespace Ryujinx.Ava.UI.Renderer
{
_className = "NativeWindow-" + Guid.NewGuid();
- _wndProcDelegate = delegate (IntPtr hWnd, WindowsMessages msg, IntPtr wParam, IntPtr lParam)
+ _wndProcDelegate = delegate (nint hWnd, WindowsMessages msg, nint wParam, nint lParam)
{
switch (msg)
{
@@ -162,7 +162,7 @@ namespace Ryujinx.Ava.UI.Renderer
RegisterClassEx(ref wndClassEx);
- WindowHandle = CreateWindowEx(0, _className, "NativeWindow", WindowStyles.WsChild, 0, 0, 640, 480, control.Handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
+ WindowHandle = CreateWindowEx(0, _className, "NativeWindow", WindowStyles.WsChild, 0, 0, 640, 480, control.Handle, nint.Zero, nint.Zero, nint.Zero);
SetWindowLongPtrW(control.Handle, GWLP_WNDPROC, wndClassEx.lpfnWndProc);
@@ -195,7 +195,7 @@ namespace Ryujinx.Ava.UI.Renderer
metalLayer.SendMessage("setContentsScale:", Program.DesktopScaleFactor);
};
- IntPtr nsView = child.ObjPtr;
+ nint nsView = child.ObjPtr;
MetalLayer = metalLayer.ObjPtr;
NsView = nsView;
diff --git a/src/Ryujinx/UI/Renderer/OpenTKBindingsContext.cs b/src/Ryujinx/UI/Renderer/OpenTKBindingsContext.cs
index 85e8585fc..2e5dff733 100644
--- a/src/Ryujinx/UI/Renderer/OpenTKBindingsContext.cs
+++ b/src/Ryujinx/UI/Renderer/OpenTKBindingsContext.cs
@@ -5,14 +5,14 @@ namespace Ryujinx.Ava.UI.Renderer
{
internal class OpenTKBindingsContext : IBindingsContext
{
- private readonly Func _getProcAddress;
+ private readonly Func _getProcAddress;
- public OpenTKBindingsContext(Func getProcAddress)
+ public OpenTKBindingsContext(Func getProcAddress)
{
_getProcAddress = getProcAddress;
}
- public IntPtr GetProcAddress(string procName)
+ public nint GetProcAddress(string procName)
{
return _getProcAddress(procName);
}
diff --git a/src/Ryujinx/UI/Renderer/RendererHost.axaml.cs b/src/Ryujinx/UI/Renderer/RendererHost.axaml.cs
index d055d9ea4..4bf10d0d7 100644
--- a/src/Ryujinx/UI/Renderer/RendererHost.axaml.cs
+++ b/src/Ryujinx/UI/Renderer/RendererHost.axaml.cs
@@ -60,7 +60,7 @@ namespace Ryujinx.Ava.UI.Renderer
BoundsChanged?.Invoke(sender, e);
}
- private void CurrentWindow_WindowCreated(object sender, IntPtr e)
+ private void CurrentWindow_WindowCreated(object sender, nint e)
{
WindowCreated?.Invoke(this, EventArgs.Empty);
}
diff --git a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs
index 3fb991531..c133f25fa 100644
--- a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs
@@ -45,7 +45,6 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
private PlayerIndex _playerId;
private int _controller;
- private readonly int _controllerNumber;
private string _controllerImage;
private int _device;
private object _configViewModel;
diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
index f74d358f0..a528e091d 100644
--- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
@@ -3,6 +3,7 @@ using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Input;
using Avalonia.Media;
+using Avalonia.Media.Imaging;
using Avalonia.Platform.Storage;
using Avalonia.Threading;
using DynamicData;
@@ -42,6 +43,7 @@ using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Linq;
+using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Key = Ryujinx.Input.Key;
@@ -53,6 +55,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public class MainWindowViewModel : BaseModel
{
private const int HotKeyPressDelayMs = 500;
+ private delegate int LoadContentFromFolderDelegate(List dirs, out int numRemoved);
private ObservableCollectionExtended _applications;
private string _aspectStatusText;
@@ -66,7 +69,9 @@ namespace Ryujinx.Ava.UI.ViewModels
private string _gameStatusText;
private string _volumeStatusText;
private string _gpuStatusText;
+ private string _shaderCountText;
private bool _isAmiiboRequested;
+ private bool _showRightmostSeparator;
private bool _isGameRunning;
private bool _isFullScreen;
private int _progressMaximum;
@@ -114,6 +119,9 @@ namespace Ryujinx.Ava.UI.ViewModels
public ApplicationData ListSelectedApplication;
public ApplicationData GridSelectedApplication;
+ public static readonly Bitmap IconBitmap =
+ new(Assembly.GetAssembly(typeof(ConfigurationState))!.GetManifestResourceStream("Ryujinx.UI.Common.Resources.Logo_Ryujinx.png")!);
+
public MainWindow Window { get; init; }
internal AppHost AppHost { get; set; }
@@ -167,6 +175,10 @@ namespace Ryujinx.Ava.UI.ViewModels
SwitchToGameControl = switchToGameControl;
SetMainContent = setMainContent;
TopLevel = topLevel;
+
+#if DEBUG
+ topLevel.AttachDevTools(new KeyGesture(Avalonia.Input.Key.F12, KeyModifiers.Control));
+#endif
}
#region Properties
@@ -180,18 +192,16 @@ namespace Ryujinx.Ava.UI.ViewModels
_searchTimer?.Dispose();
- _searchTimer = new Timer(TimerCallback, null, 1000, 0);
+ _searchTimer = new Timer(_ =>
+ {
+ RefreshView();
+
+ _searchTimer.Dispose();
+ _searchTimer = null;
+ }, null, 1000, 0);
}
}
- private void TimerCallback(object obj)
- {
- RefreshView();
-
- _searchTimer.Dispose();
- _searchTimer = null;
- }
-
public bool CanUpdate
{
get => _canUpdate && EnableNonGameRunningControls && Updater.CanUpdate(false);
@@ -260,6 +270,17 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool ShowFirmwareStatus => !ShowLoadProgress;
+ public bool ShowRightmostSeparator
+ {
+ get => _showRightmostSeparator;
+ set
+ {
+ _showRightmostSeparator = value;
+
+ OnPropertyChanged();
+ }
+ }
+
public bool IsGameRunning
{
get => _isGameRunning;
@@ -534,6 +555,16 @@ namespace Ryujinx.Ava.UI.ViewModels
OnPropertyChanged();
}
}
+
+ public string ShaderCountText
+ {
+ get => _shaderCountText;
+ set
+ {
+ _shaderCountText = value;
+ OnPropertyChanged();
+ }
+ }
public string BackendText
{
@@ -982,29 +1013,26 @@ namespace Ryujinx.Ava.UI.ViewModels
#region PrivateMethods
- private IComparer GetComparer()
- {
- return SortMode switch
+ private static IComparer CreateComparer(bool ascending, Func selector) =>
+ ascending
+ ? SortExpressionComparer.Ascending(selector)
+ : SortExpressionComparer.Descending(selector);
+
+ private IComparer GetComparer()
+ => SortMode switch
{
#pragma warning disable IDE0055 // Disable formatting
- ApplicationSort.Title => IsAscending ? SortExpressionComparer.Ascending(app => app.Name)
- : SortExpressionComparer.Descending(app => app.Name),
- ApplicationSort.Developer => IsAscending ? SortExpressionComparer.Ascending(app => app.Developer)
- : SortExpressionComparer.Descending(app => app.Developer),
+ ApplicationSort.Title => CreateComparer(IsAscending, app => app.Name),
+ ApplicationSort.Developer => CreateComparer(IsAscending, app => app.Developer),
ApplicationSort.LastPlayed => new LastPlayedSortComparer(IsAscending),
ApplicationSort.TotalTimePlayed => new TimePlayedSortComparer(IsAscending),
- ApplicationSort.FileType => IsAscending ? SortExpressionComparer.Ascending(app => app.FileExtension)
- : SortExpressionComparer.Descending(app => app.FileExtension),
- ApplicationSort.FileSize => IsAscending ? SortExpressionComparer.Ascending(app => app.FileSize)
- : SortExpressionComparer.Descending(app => app.FileSize),
- ApplicationSort.Path => IsAscending ? SortExpressionComparer.Ascending(app => app.Path)
- : SortExpressionComparer.Descending(app => app.Path),
- ApplicationSort.Favorite => IsAscending ? SortExpressionComparer.Ascending(app => new AppListFavoriteComparable(app))
- : SortExpressionComparer.Descending(app => new AppListFavoriteComparable(app)),
+ ApplicationSort.FileType => CreateComparer(IsAscending, app => app.FileExtension),
+ ApplicationSort.FileSize => CreateComparer(IsAscending, app => app.FileSize),
+ ApplicationSort.Path => CreateComparer(IsAscending, app => app.Path),
+ ApplicationSort.Favorite => CreateComparer(IsAscending, app => new AppListFavoriteComparable(app)),
_ => null,
#pragma warning restore IDE0055
};
- }
public void RefreshView()
{
@@ -1129,7 +1157,7 @@ namespace Ryujinx.Ava.UI.ViewModels
}
catch (MissingKeyException ex)
{
- if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+ if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime)
{
Logger.Error?.Print(LogClass.Application, ex.ToString());
@@ -1215,8 +1243,7 @@ namespace Ryujinx.Ava.UI.ViewModels
private void InitializeGame()
{
RendererHostControl.WindowCreated += RendererHost_Created;
-
- AppHost.StatusInitEvent += Init_StatusBar;
+
AppHost.StatusUpdatedEvent += Update_StatusBar;
AppHost.AppExit += AppHost_AppExit;
@@ -1243,18 +1270,6 @@ namespace Ryujinx.Ava.UI.ViewModels
}
}
- private void Init_StatusBar(object sender, StatusInitEventArgs args)
- {
- if (ShowMenuAndStatusBar && !ShowLoadProgress)
- {
- Dispatcher.UIThread.InvokeAsync(() =>
- {
- GpuNameText = args.GpuName;
- BackendText = args.GpuBackend;
- });
- }
- }
-
private void Update_StatusBar(object sender, StatusUpdatedEventArgs args)
{
if (ShowMenuAndStatusBar && !ShowLoadProgress)
@@ -1277,6 +1292,10 @@ namespace Ryujinx.Ava.UI.ViewModels
GameStatusText = args.GameStatus;
VolumeStatusText = args.VolumeStatus;
FifoStatusText = args.FifoStatus;
+
+ ShaderCountText = (ShowRightmostSeparator = args.ShaderCount > 0)
+ ? $"{LocaleManager.Instance[LocaleKeys.CompilingShaders]}: {args.ShaderCount}"
+ : string.Empty;
ShowStatusSeparator = true;
});
@@ -1290,7 +1309,7 @@ namespace Ryujinx.Ava.UI.ViewModels
_rendererWaitEvent.Set();
}
- private async Task LoadContentFromFolder(LocaleKeys localeMessageKey, Func, int> onDirsSelected)
+ private async Task LoadContentFromFolder(LocaleKeys localeMessageAddedKey, LocaleKeys localeMessageRemovedKey, LoadContentFromFolderDelegate onDirsSelected)
{
var result = await StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
{
@@ -1301,14 +1320,17 @@ namespace Ryujinx.Ava.UI.ViewModels
if (result.Count > 0)
{
var dirs = result.Select(it => it.Path.LocalPath).ToList();
- var numAdded = onDirsSelected(dirs);
+ var numAdded = onDirsSelected(dirs, out int numRemoved);
- var msg = string.Format(LocaleManager.Instance[localeMessageKey], numAdded);
+ var msg = String.Join("\r\n", new string[] {
+ string.Format(LocaleManager.Instance[localeMessageRemovedKey], numRemoved),
+ string.Format(LocaleManager.Instance[localeMessageAddedKey], numAdded)
+ });
await Dispatcher.UIThread.InvokeAsync(async () =>
{
await ContentDialogHelper.ShowTextDialog(
- LocaleManager.Instance[numAdded > 0 ? LocaleKeys.RyujinxConfirm : LocaleKeys.RyujinxInfo],
+ LocaleManager.Instance[numAdded > 0 || numRemoved > 0 ? LocaleKeys.RyujinxConfirm : LocaleKeys.RyujinxInfo],
msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)Symbol.Checkmark);
});
}
@@ -1448,7 +1470,7 @@ namespace Ryujinx.Ava.UI.ViewModels
{
if (IsGameRunning)
{
- ConfigurationState.Instance.System.EnableDockedMode.Value = !ConfigurationState.Instance.System.EnableDockedMode.Value;
+ ConfigurationState.Instance.System.EnableDockedMode.Toggle();
}
}
@@ -1564,12 +1586,18 @@ namespace Ryujinx.Ava.UI.ViewModels
public async Task LoadDlcFromFolder()
{
- await LoadContentFromFolder(LocaleKeys.AutoloadDlcAddedMessage, ApplicationLibrary.AutoLoadDownloadableContents);
+ await LoadContentFromFolder(
+ LocaleKeys.AutoloadDlcAddedMessage,
+ LocaleKeys.AutoloadDlcRemovedMessage,
+ ApplicationLibrary.AutoLoadDownloadableContents);
}
public async Task LoadTitleUpdatesFromFolder()
{
- await LoadContentFromFolder(LocaleKeys.AutoloadUpdateAddedMessage, ApplicationLibrary.AutoLoadTitleUpdates);
+ await LoadContentFromFolder(
+ LocaleKeys.AutoloadUpdateAddedMessage,
+ LocaleKeys.AutoloadUpdateRemovedMessage,
+ ApplicationLibrary.AutoLoadTitleUpdates);
}
public async Task OpenFolder()
@@ -1656,8 +1684,7 @@ namespace Ryujinx.Ava.UI.ViewModels
gameThread.Start();
}
- public void SwitchToRenderer(bool startFullscreen)
- {
+ public void SwitchToRenderer(bool startFullscreen) =>
Dispatcher.UIThread.Post(() =>
{
SwitchToGameControl(startFullscreen);
@@ -1666,15 +1693,9 @@ namespace Ryujinx.Ava.UI.ViewModels
RendererHostControl.Focus();
});
- }
- public static void UpdateGameMetadata(string titleId)
- {
- ApplicationLibrary.LoadAndSaveMetaData(titleId, appMetadata =>
- {
- appMetadata.UpdatePostGame();
- });
- }
+ public static void UpdateGameMetadata(string titleId)
+ => ApplicationLibrary.LoadAndSaveMetaData(titleId, appMetadata => appMetadata.UpdatePostGame());
public void RefreshFirmwareStatus()
{
diff --git a/src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs b/src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs
index 8321bf894..df2ef266e 100644
--- a/src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs
@@ -4,6 +4,7 @@ using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Platform.Storage;
using Avalonia.Threading;
using DynamicData;
+using Gommon;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.Models;
@@ -182,7 +183,7 @@ namespace Ryujinx.Ava.UI.ViewModels
JsonHelper.SerializeToFile(_modJsonPath, modData, _serializerContext.ModMetadata);
}
- public void Delete(ModModel model)
+ public void Delete(ModModel model, bool removeFromList = true)
{
var isSubdir = true;
var pathToDelete = model.Path;
@@ -222,8 +223,11 @@ namespace Ryujinx.Ava.UI.ViewModels
Logger.Info?.Print(LogClass.Application, $"Deleting mod at \"{pathToDelete}\"");
Directory.Delete(pathToDelete, true);
- Mods.Remove(model);
- OnPropertyChanged(nameof(ModCount));
+ if (removeFromList)
+ {
+ Mods.Remove(model);
+ OnPropertyChanged(nameof(ModCount));
+ }
Sort();
}
@@ -313,11 +317,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public void DeleteAll()
{
- foreach (var mod in Mods)
- {
- Delete(mod);
- }
-
+ Mods.ForEach(it => Delete(it, false));
Mods.Clear();
OnPropertyChanged(nameof(ModCount));
Sort();
diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs
index 537418ea9..ce024784e 100644
--- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs
@@ -144,6 +144,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool EnableDiscordIntegration { get; set; }
public bool CheckUpdatesOnStart { get; set; }
public bool ShowConfirmExit { get; set; }
+ public bool IgnoreApplet { get; set; }
public bool RememberWindowState { get; set; }
public int HideCursor { get; set; }
public bool EnableDockedMode { get; set; }
@@ -286,11 +287,11 @@ namespace Ryujinx.Ava.UI.ViewModels
public SettingsViewModel()
{
- GameDirectories = new AvaloniaList();
- AutoloadDirectories = new AvaloniaList();
- TimeZones = new AvaloniaList();
- AvailableGpus = new ObservableCollection();
- _validTzRegions = new List();
+ GameDirectories = [];
+ AutoloadDirectories = [];
+ TimeZones = [];
+ AvailableGpus = [];
+ _validTzRegions = [];
_networkInterfaces = new Dictionary();
Task.Run(CheckSoundBackends);
@@ -407,6 +408,7 @@ namespace Ryujinx.Ava.UI.ViewModels
EnableDiscordIntegration = config.EnableDiscordIntegration;
CheckUpdatesOnStart = config.CheckUpdatesOnStart;
ShowConfirmExit = config.ShowConfirmExit;
+ IgnoreApplet = config.IgnoreApplet;
RememberWindowState = config.RememberWindowState;
HideCursor = (int)config.HideCursor.Value;
@@ -503,6 +505,7 @@ namespace Ryujinx.Ava.UI.ViewModels
config.EnableDiscordIntegration.Value = EnableDiscordIntegration;
config.CheckUpdatesOnStart.Value = CheckUpdatesOnStart;
config.ShowConfirmExit.Value = ShowConfirmExit;
+ config.IgnoreApplet.Value = IgnoreApplet;
config.RememberWindowState.Value = RememberWindowState;
config.HideCursor.Value = (HideCursorMode)HideCursor;
diff --git a/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs b/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs
index fad7a08f7..edb05282d 100644
--- a/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs
+++ b/src/Ryujinx/UI/Views/Main/MainMenuBarView.axaml.cs
@@ -36,23 +36,17 @@ namespace Ryujinx.Ava.UI.Views.Main
ChangeLanguageMenuItem.ItemsSource = GenerateLanguageMenuItems();
}
- private CheckBox[] GenerateToggleFileTypeItems()
- {
- List checkBoxes = new();
-
- foreach (var item in Enum.GetValues(typeof(FileTypes)))
- {
- string fileName = Enum.GetName(typeof(FileTypes), item);
- checkBoxes.Add(new CheckBox
- {
- Content = $".{fileName}",
- IsChecked = ((FileTypes)item).GetConfigValue(ConfigurationState.Instance.UI.ShownFileTypes),
- Command = MiniCommand.Create(() => Window.ToggleFileType(fileName)),
- });
- }
-
- return checkBoxes.ToArray();
- }
+ private CheckBox[] GenerateToggleFileTypeItems() =>
+ Enum.GetValues()
+ .Select(it => (FileName: Enum.GetName(it)!, FileType: it))
+ .Select(it =>
+ new CheckBox
+ {
+ Content = $".{it.FileName}",
+ IsChecked = it.FileType.GetConfigValue(ConfigurationState.Instance.UI.ShownFileTypes),
+ Command = MiniCommand.Create(() => Window.ToggleFileType(it.FileName))
+ }
+ ).ToArray();
private static MenuItem[] GenerateLanguageMenuItems()
{
@@ -80,7 +74,7 @@ namespace Ryujinx.Ava.UI.Views.Main
{
Padding = new Thickness(10, 0, 0, 0),
Header = " " + languageName,
- Command = MiniCommand.Create(() => MainWindowViewModel.ChangeLanguage(languageCode)),
+ Command = MiniCommand.Create(() => MainWindowViewModel.ChangeLanguage(languageCode))
};
menuItems.Add(menuItem);
diff --git a/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml b/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml
index ded7e2949..1691bbd84 100644
--- a/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml
+++ b/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml
@@ -268,6 +268,19 @@
IsVisible="{Binding !ShowLoadProgress}"
Text="{Binding GpuNameText}"
TextAlignment="Start" />
+
+
-
+
diff --git a/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml
index 384231880..92485a569 100644
--- a/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml
+++ b/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml
@@ -195,12 +195,13 @@
+ Spacing="5">
+
+
+
diff --git a/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml
index ac5e8371f..58fe0548c 100644
--- a/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml
+++ b/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml
@@ -1,4 +1,4 @@
-
-
+
+
+
+