mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-01 10:39:50 -06:00
Compare commits
17 Commits
Canary-1.2
...
Canary-1.2
Author | SHA1 | Date | |
---|---|---|---|
15c20920b3 | |||
285ee276b6 | |||
617b81e209 | |||
eb6ce7bcb3 | |||
69f75f2df1 | |||
10c8d73b60 | |||
e01a30016e | |||
e26625dfd5 | |||
9c82d98ec4 | |||
4aae82bad1 | |||
299be822c4 | |||
b17e4f79fb | |||
a7b58df3fe | |||
8c2d6192ba | |||
2a23000fed | |||
ab7d0a2e6d | |||
bd2681b2f9 |
60
.github/workflows/build.yml
vendored
60
.github/workflows/build.yml
vendored
@ -74,36 +74,36 @@ 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 }}"
|
||||
- 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
|
||||
sudo apt install -y zsync desktop-file-utils appstream
|
||||
|
||||
# mkdir -p tools
|
||||
# export PATH="$PATH:$(readlink -f tools)"
|
||||
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
|
||||
# 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
|
||||
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
|
||||
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
|
||||
@ -112,12 +112,12 @@ 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 (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
|
||||
|
108
.github/workflows/release.yml
vendored
108
.github/workflows/release.yml
vendored
@ -101,83 +101,79 @@ jobs:
|
||||
|
||||
- name: Publish
|
||||
run: |
|
||||
dotnet publish -c Release -r "${{ matrix.platform.name }}" -o ./publish_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx --self-contained -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
dotnet publish -c Release -r "${{ matrix.platform.name }}" -o ./publish_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Headless.SDL2 --self-contained -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
dotnet publish -c Release -r "${{ matrix.platform.name }}" -o ./publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx --self-contained -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
dotnet publish -c Release -r "${{ matrix.platform.name }}" -o ./publish_sdl2_headless -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Headless.SDL2 --self-contained -p:IncludeNativeLibrariesForSelfExtract=true
|
||||
|
||||
- name: Packing Windows builds
|
||||
if: matrix.platform.os == 'windows-latest'
|
||||
run: |
|
||||
pushd publish_ava
|
||||
rm publish/libarmeilleure-jitsupport.dylib
|
||||
7z a ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
||||
pushd publish
|
||||
rm libarmeilleure-jitsupport.dylib
|
||||
7z a ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip ../publish
|
||||
popd
|
||||
|
||||
pushd publish_sdl2_headless
|
||||
rm publish/libarmeilleure-jitsupport.dylib
|
||||
7z a ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
||||
rm libarmeilleure-jitsupport.dylib
|
||||
7z a ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip ../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 OUTDIR=publish_appimage distribution/linux/appimage/build-appimage.sh
|
||||
|
||||
pushd publish_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: Packing Linux builds
|
||||
if: matrix.platform.os == 'ubuntu-latest'
|
||||
run: |
|
||||
pushd publish_ava
|
||||
rm publish/libarmeilleure-jitsupport.dylib
|
||||
chmod +x publish/Ryujinx.sh publish/Ryujinx
|
||||
tar -czvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
||||
pushd publish
|
||||
chmod +x Ryujinx.sh Ryujinx
|
||||
tar -czvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz ../publish
|
||||
popd
|
||||
|
||||
pushd publish_sdl2_headless
|
||||
rm publish/libarmeilleure-jitsupport.dylib
|
||||
chmod +x publish/Ryujinx.sh publish/Ryujinx.Headless.SDL2
|
||||
tar -czvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
||||
chmod +x Ryujinx.sh Ryujinx.Headless.SDL2
|
||||
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*"
|
||||
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
|
||||
@ -233,7 +229,7 @@ jobs:
|
||||
|
||||
- name: Publish macOS Ryujinx
|
||||
run: |
|
||||
./distribution/macos/create_macos_build_ava.sh . publish_tmp_ava publish_ava ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release
|
||||
./distribution/macos/create_macos_build_ava.sh . publish_tmp_ava publish ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release
|
||||
|
||||
- name: Publish macOS Ryujinx.Headless.SDL2
|
||||
run: |
|
||||
@ -243,7 +239,7 @@ jobs:
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: ${{ steps.version_info.outputs.build_version }}
|
||||
artifacts: "publish_ava/*.tar.gz, publish_headless/*.tar.gz"
|
||||
artifacts: "publish/*.tar.gz, publish_headless/*.tar.gz"
|
||||
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
|
||||
|
@ -22,7 +22,7 @@
|
||||
<PackageVersion Include="LibHac" Version="0.19.0" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
|
||||
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.1" />
|
||||
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.1.2" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
|
||||
<PackageVersion Include="MsgPack.Cli" Version="1.0.1" />
|
||||
|
@ -14,6 +14,15 @@
|
||||
<img src="https://img.shields.io/github/v/release/GreemDev/Ryujinx"
|
||||
alt="Latest Release">
|
||||
</a>
|
||||
<br>
|
||||
<a href="https://github.com/GreemDev/Ryujinx/actions/workflows/canary.yml">
|
||||
<img src="https://github.com/GreemDev/Ryujinx/actions/workflows/canary.yml/badge.svg"
|
||||
alt="">
|
||||
</a>
|
||||
<a href="https://github.com/GreemDev/Ryujinx-Canary/releases/latest">
|
||||
<img src="https://img.shields.io/github/v/release/GreemDev/Ryujinx-Canary?label=canary"
|
||||
alt="Latest Canary Release">
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<p align="center">
|
||||
|
@ -77,7 +77,7 @@ namespace ARMeilleure.Translation
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
for (int pBlkIndex = 0; pBlkIndex < block.Predecessors.Count; pBlkIndex++)
|
||||
{
|
||||
BasicBlock current = block.Predecessors[pBlkIndex];
|
||||
|
@ -13,6 +13,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Runtime;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -848,18 +849,15 @@ namespace ARMeilleure.Translation.PTC
|
||||
}
|
||||
}
|
||||
|
||||
List<Thread> threads = new();
|
||||
|
||||
for (int i = 0; i < degreeOfParallelism; i++)
|
||||
{
|
||||
Thread thread = new(TranslateFuncs)
|
||||
{
|
||||
IsBackground = true,
|
||||
Name = "Ptc.TranslateThread." + i
|
||||
};
|
||||
|
||||
threads.Add(thread);
|
||||
}
|
||||
List<Thread> threads = Enumerable.Range(0, degreeOfParallelism)
|
||||
.Select(idx =>
|
||||
new Thread(TranslateFuncs)
|
||||
{
|
||||
IsBackground = true,
|
||||
Name = "Ptc.TranslateThread." + idx
|
||||
}
|
||||
).ToList();
|
||||
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
|
||||
|
@ -30,10 +30,10 @@ namespace Ryujinx.Common.Logging.Targets
|
||||
string ILogTarget.Name { get => _target.Name; }
|
||||
|
||||
public AsyncLogTargetWrapper(ILogTarget target)
|
||||
: this(target, -1, AsyncLogTargetOverflowAction.Block)
|
||||
: this(target, -1)
|
||||
{ }
|
||||
|
||||
public AsyncLogTargetWrapper(ILogTarget target, int queueLimit, AsyncLogTargetOverflowAction overflowAction)
|
||||
public AsyncLogTargetWrapper(ILogTarget target, int queueLimit = -1, AsyncLogTargetOverflowAction overflowAction = AsyncLogTargetOverflowAction.Block)
|
||||
{
|
||||
_target = target;
|
||||
_messageQueue = new BlockingCollection<LogEventArgs>(queueLimit);
|
||||
|
@ -1,11 +1,13 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.Common
|
||||
{
|
||||
public class ReactiveObject<T>
|
||||
{
|
||||
private readonly ReaderWriterLockSlim _readerWriterLock = new();
|
||||
private readonly ReaderWriterLockSlim _rwLock = new();
|
||||
private bool _isInitialized;
|
||||
private T _value;
|
||||
|
||||
@ -15,15 +17,15 @@ namespace Ryujinx.Common
|
||||
{
|
||||
get
|
||||
{
|
||||
_readerWriterLock.EnterReadLock();
|
||||
_rwLock.EnterReadLock();
|
||||
T value = _value;
|
||||
_readerWriterLock.ExitReadLock();
|
||||
_rwLock.ExitReadLock();
|
||||
|
||||
return value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_readerWriterLock.EnterWriteLock();
|
||||
_rwLock.EnterWriteLock();
|
||||
|
||||
T oldValue = _value;
|
||||
|
||||
@ -32,7 +34,7 @@ namespace Ryujinx.Common
|
||||
_isInitialized = true;
|
||||
_value = value;
|
||||
|
||||
_readerWriterLock.ExitWriteLock();
|
||||
_rwLock.ExitWriteLock();
|
||||
|
||||
if (!oldIsInitialized || oldValue == null || !oldValue.Equals(_value))
|
||||
{
|
||||
@ -40,12 +42,22 @@ namespace Ryujinx.Common
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void LogChangesToValue(string valueName, LogClass logClass = LogClass.Configuration)
|
||||
=> Event += (_, e) => ReactiveObjectHelper.LogValueChange(logClass, e, valueName);
|
||||
|
||||
public static implicit operator T(ReactiveObject<T> obj) => obj.Value;
|
||||
}
|
||||
|
||||
public static class ReactiveObjectHelper
|
||||
{
|
||||
public static void LogValueChange<T>(LogClass logClass, ReactiveEventArgs<T> eventArgs, string valueName)
|
||||
{
|
||||
string message = string.Create(CultureInfo.InvariantCulture, $"{valueName} set to: {eventArgs.NewValue}");
|
||||
|
||||
Logger.Info?.Print(logClass, message);
|
||||
}
|
||||
|
||||
public static void Toggle(this ReactiveObject<bool> rBoolean) => rBoolean.Value = !rBoolean.Value;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Applets.Browser;
|
||||
using Ryujinx.HLE.HOS.Applets.Dummy;
|
||||
using Ryujinx.HLE.HOS.Applets.Error;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
||||
using System;
|
||||
@ -26,9 +28,13 @@ namespace Ryujinx.HLE.HOS.Applets
|
||||
return new BrowserApplet(system);
|
||||
case AppletId.LibAppletOff:
|
||||
return new BrowserApplet(system);
|
||||
case AppletId.MiiEdit:
|
||||
Logger.Warning?.Print(LogClass.Application, $"Please use the MiiEdit inside File/Open Applet");
|
||||
return new DummyApplet(system);
|
||||
}
|
||||
|
||||
throw new NotImplementedException($"{applet} applet is not implemented.");
|
||||
Logger.Warning?.Print(LogClass.Application, $"Applet {applet} not implemented!");
|
||||
return new DummyApplet(system);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
43
src/Ryujinx.HLE/HOS/Applets/Dummy/DummyApplet.cs
Normal file
43
src/Ryujinx.HLE/HOS/Applets/Dummy/DummyApplet.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.Memory;
|
||||
using Ryujinx.HLE.HOS.Applets;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
namespace Ryujinx.HLE.HOS.Applets.Dummy
|
||||
{
|
||||
internal class DummyApplet : IApplet
|
||||
{
|
||||
private readonly Horizon _system;
|
||||
private AppletSession _normalSession;
|
||||
public event EventHandler AppletStateChanged;
|
||||
public DummyApplet(Horizon system)
|
||||
{
|
||||
_system = system;
|
||||
}
|
||||
public ResultCode Start(AppletSession normalSession, AppletSession interactiveSession)
|
||||
{
|
||||
_normalSession = normalSession;
|
||||
_normalSession.Push(BuildResponse());
|
||||
AppletStateChanged?.Invoke(this, null);
|
||||
_system.ReturnFocus();
|
||||
return ResultCode.Success;
|
||||
}
|
||||
private static T ReadStruct<T>(byte[] data) where T : struct
|
||||
{
|
||||
return MemoryMarshal.Read<T>(data.AsSpan());
|
||||
}
|
||||
private static byte[] BuildResponse()
|
||||
{
|
||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||
using BinaryWriter writer = new(stream);
|
||||
writer.Write((ulong)ResultCode.Success);
|
||||
return stream.ToArray();
|
||||
}
|
||||
public ResultCode GetResult()
|
||||
{
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
@ -2463,7 +2463,7 @@ namespace Ryujinx.HLE.HOS.Diagnostics.Demangler
|
||||
return ParseIntegerLiteral("unsigned short");
|
||||
case 'i':
|
||||
_position++;
|
||||
return ParseIntegerLiteral("");
|
||||
return ParseIntegerLiteral(string.Empty);
|
||||
case 'j':
|
||||
_position++;
|
||||
return ParseIntegerLiteral("u");
|
||||
|
@ -116,18 +116,13 @@ namespace Ryujinx.HLE.HOS
|
||||
private readonly Dictionary<ulong, ModCache> _appMods; // key is ApplicationId
|
||||
private PatchCache _patches;
|
||||
|
||||
private static readonly EnumerationOptions _dirEnumOptions;
|
||||
|
||||
static ModLoader()
|
||||
private static readonly EnumerationOptions _dirEnumOptions = new()
|
||||
{
|
||||
_dirEnumOptions = new EnumerationOptions
|
||||
{
|
||||
MatchCasing = MatchCasing.CaseInsensitive,
|
||||
MatchType = MatchType.Simple,
|
||||
RecurseSubdirectories = false,
|
||||
ReturnSpecialDirectories = false,
|
||||
};
|
||||
}
|
||||
MatchCasing = MatchCasing.CaseInsensitive,
|
||||
MatchType = MatchType.Simple,
|
||||
RecurseSubdirectories = false,
|
||||
ReturnSpecialDirectories = false,
|
||||
};
|
||||
|
||||
public ModLoader()
|
||||
{
|
||||
@ -169,7 +164,7 @@ namespace Ryujinx.HLE.HOS
|
||||
foreach (var modDir in dir.EnumerateDirectories())
|
||||
{
|
||||
types.Clear();
|
||||
Mod<DirectoryInfo> mod = new("", null, true);
|
||||
Mod<DirectoryInfo> mod = new(string.Empty, null, true);
|
||||
|
||||
if (StrEquals(RomfsDir, modDir.Name))
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager
|
||||
public uint FileVersion { get; set; }
|
||||
public byte[] TagUuid { get; set; }
|
||||
public string AmiiboId { get; set; }
|
||||
public string NickName { get; set; }
|
||||
public DateTime FirstWriteDate { get; set; }
|
||||
public DateTime LastWriteDate { get; set; }
|
||||
public ushort WriteCounter { get; set; }
|
||||
|
@ -64,16 +64,17 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
};
|
||||
}
|
||||
|
||||
public static RegisterInfo GetRegisterInfo(ITickSource tickSource, string amiiboId, string nickname)
|
||||
public static RegisterInfo GetRegisterInfo(ITickSource tickSource, string amiiboId, string userName)
|
||||
{
|
||||
VirtualAmiiboFile amiiboFile = LoadAmiiboFile(amiiboId);
|
||||
|
||||
string nickname = amiiboFile.NickName ?? "Ryujinx";
|
||||
UtilityImpl utilityImpl = new(tickSource);
|
||||
CharInfo charInfo = new();
|
||||
|
||||
charInfo.SetFromStoreData(StoreData.BuildDefault(utilityImpl, 0));
|
||||
|
||||
charInfo.Nickname = Nickname.FromString(nickname);
|
||||
// This is the player's name
|
||||
charInfo.Nickname = Nickname.FromString(userName);
|
||||
|
||||
RegisterInfo registerInfo = new()
|
||||
{
|
||||
@ -85,7 +86,9 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp
|
||||
Reserved1 = new Array64<byte>(),
|
||||
Reserved2 = new Array58<byte>(),
|
||||
};
|
||||
"Ryujinx"u8.CopyTo(registerInfo.Nickname.AsSpan());
|
||||
// This is the amiibo's name
|
||||
byte[] nicknameBytes = System.Text.Encoding.UTF8.GetBytes(nickname);
|
||||
nicknameBytes.CopyTo(registerInfo.Nickname.AsSpan());
|
||||
|
||||
return registerInfo;
|
||||
}
|
||||
|
@ -117,8 +117,9 @@ namespace Ryujinx.Headless.SDL2.OpenGL
|
||||
GraphicsDebugLevel glLogLevel,
|
||||
AspectRatio aspectRatio,
|
||||
bool enableMouse,
|
||||
HideCursorMode hideCursorMode)
|
||||
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode)
|
||||
HideCursorMode hideCursorMode,
|
||||
bool ignoreControllerApplet)
|
||||
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet)
|
||||
{
|
||||
_glLogLevel = glLogLevel;
|
||||
}
|
||||
|
@ -225,6 +225,9 @@ namespace Ryujinx.Headless.SDL2
|
||||
|
||||
[Option("ignore-missing-services", Required = false, Default = false, HelpText = "Enable ignoring missing services.")]
|
||||
public bool IgnoreMissingServices { get; set; }
|
||||
|
||||
[Option("ignore-controller-applet", Required = false, Default = false, HelpText = "Enable ignoring the controller applet when your game loses connection to your controller.")]
|
||||
public bool IgnoreControllerApplet { get; set; }
|
||||
|
||||
// Values
|
||||
|
||||
|
@ -444,8 +444,7 @@ namespace Ryujinx.Headless.SDL2
|
||||
{
|
||||
Logger.AddTarget(new AsyncLogTargetWrapper(
|
||||
new FileLogTarget("file", logFile),
|
||||
1000,
|
||||
AsyncLogTargetOverflowAction.Block
|
||||
1000
|
||||
));
|
||||
}
|
||||
else
|
||||
@ -506,8 +505,8 @@ namespace Ryujinx.Headless.SDL2
|
||||
private static WindowBase CreateWindow(Options options)
|
||||
{
|
||||
return options.GraphicsBackend == GraphicsBackend.Vulkan
|
||||
? new VulkanWindow(_inputManager, options.LoggingGraphicsDebugLevel, options.AspectRatio, options.EnableMouse, options.HideCursorMode)
|
||||
: new OpenGLWindow(_inputManager, options.LoggingGraphicsDebugLevel, options.AspectRatio, options.EnableMouse, options.HideCursorMode);
|
||||
? new VulkanWindow(_inputManager, options.LoggingGraphicsDebugLevel, options.AspectRatio, options.EnableMouse, options.HideCursorMode, options.IgnoreControllerApplet)
|
||||
: new OpenGLWindow(_inputManager, options.LoggingGraphicsDebugLevel, options.AspectRatio, options.EnableMouse, options.HideCursorMode, options.IgnoreControllerApplet);
|
||||
}
|
||||
|
||||
private static IRenderer CreateRenderer(Options options, WindowBase window)
|
||||
|
@ -17,8 +17,9 @@ namespace Ryujinx.Headless.SDL2.Vulkan
|
||||
GraphicsDebugLevel glLogLevel,
|
||||
AspectRatio aspectRatio,
|
||||
bool enableMouse,
|
||||
HideCursorMode hideCursorMode)
|
||||
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode)
|
||||
HideCursorMode hideCursorMode,
|
||||
bool ignoreControllerApplet)
|
||||
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet)
|
||||
{
|
||||
_glLogLevel = glLogLevel;
|
||||
}
|
||||
|
@ -86,13 +86,15 @@ namespace Ryujinx.Headless.SDL2
|
||||
|
||||
private readonly AspectRatio _aspectRatio;
|
||||
private readonly bool _enableMouse;
|
||||
private readonly bool _ignoreControllerApplet;
|
||||
|
||||
public WindowBase(
|
||||
InputManager inputManager,
|
||||
GraphicsDebugLevel glLogLevel,
|
||||
AspectRatio aspectRatio,
|
||||
bool enableMouse,
|
||||
HideCursorMode hideCursorMode)
|
||||
HideCursorMode hideCursorMode,
|
||||
bool ignoreControllerApplet)
|
||||
{
|
||||
MouseDriver = new SDL2MouseDriver(hideCursorMode);
|
||||
_inputManager = inputManager;
|
||||
@ -108,6 +110,7 @@ namespace Ryujinx.Headless.SDL2
|
||||
_gpuDoneEvent = new ManualResetEvent(false);
|
||||
_aspectRatio = aspectRatio;
|
||||
_enableMouse = enableMouse;
|
||||
_ignoreControllerApplet = ignoreControllerApplet;
|
||||
HostUITheme = new HeadlessHostUiTheme();
|
||||
|
||||
SDL2Driver.Instance.Initialize();
|
||||
@ -484,6 +487,8 @@ namespace Ryujinx.Headless.SDL2
|
||||
|
||||
public bool DisplayMessageDialog(ControllerAppletUIArgs args)
|
||||
{
|
||||
if (_ignoreControllerApplet) return false;
|
||||
|
||||
string playerCount = args.PlayerCountMin == args.PlayerCountMax ? $"exactly {args.PlayerCountMin}" : $"{args.PlayerCountMin}-{args.PlayerCountMax}";
|
||||
|
||||
string message = $"Application requests {playerCount} {"player".ToQuantity(args.PlayerCountMin + args.PlayerCountMax, ShowQuantityAs.None)} with:\n\n"
|
||||
|
@ -13,8 +13,6 @@ using Ryujinx.UI.Common.Configuration.UI;
|
||||
using Ryujinx.UI.Common.Helper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace Ryujinx.UI.Common.Configuration
|
||||
{
|
||||
@ -201,7 +199,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
IsAscendingOrder = new ReactiveObject<bool>();
|
||||
LanguageCode = new ReactiveObject<string>();
|
||||
ShowConsole = new ReactiveObject<bool>();
|
||||
ShowConsole.Event += static (s, e) => { ConsoleHelper.SetConsoleWindowState(e.NewValue); };
|
||||
ShowConsole.Event += static (_, e) => ConsoleHelper.SetConsoleWindowState(e.NewValue);
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,6 +266,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
public LoggerSection()
|
||||
{
|
||||
EnableDebug = new ReactiveObject<bool>();
|
||||
EnableDebug.LogChangesToValue(nameof(EnableDebug));
|
||||
EnableStub = new ReactiveObject<bool>();
|
||||
EnableInfo = new ReactiveObject<bool>();
|
||||
EnableWarn = new ReactiveObject<bool>();
|
||||
@ -277,7 +276,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
EnableFsAccessLog = new ReactiveObject<bool>();
|
||||
FilteredClasses = new ReactiveObject<LogClass[]>();
|
||||
EnableFileLog = new ReactiveObject<bool>();
|
||||
EnableFileLog.Event += static (sender, e) => LogValueChange(e, nameof(EnableFileLog));
|
||||
EnableFileLog.LogChangesToValue(nameof(EnableFileLog));
|
||||
GraphicsDebugLevel = new ReactiveObject<GraphicsDebugLevel>();
|
||||
}
|
||||
}
|
||||
@ -370,33 +369,37 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
public SystemSection()
|
||||
{
|
||||
Language = new ReactiveObject<Language>();
|
||||
Language.LogChangesToValue(nameof(Language));
|
||||
Region = new ReactiveObject<Region>();
|
||||
Region.LogChangesToValue(nameof(Region));
|
||||
TimeZone = new ReactiveObject<string>();
|
||||
TimeZone.LogChangesToValue(nameof(TimeZone));
|
||||
SystemTimeOffset = new ReactiveObject<long>();
|
||||
SystemTimeOffset.LogChangesToValue(nameof(SystemTimeOffset));
|
||||
EnableDockedMode = new ReactiveObject<bool>();
|
||||
EnableDockedMode.Event += static (sender, e) => LogValueChange(e, nameof(EnableDockedMode));
|
||||
EnableDockedMode.LogChangesToValue(nameof(EnableDockedMode));
|
||||
EnablePtc = new ReactiveObject<bool>();
|
||||
EnablePtc.Event += static (sender, e) => LogValueChange(e, nameof(EnablePtc));
|
||||
EnablePtc.LogChangesToValue(nameof(EnablePtc));
|
||||
EnableLowPowerPtc = new ReactiveObject<bool>();
|
||||
EnableLowPowerPtc.Event += static (sender, e) => LogValueChange(e, nameof(EnableLowPowerPtc));
|
||||
EnableLowPowerPtc.LogChangesToValue(nameof(EnableLowPowerPtc));
|
||||
EnableInternetAccess = new ReactiveObject<bool>();
|
||||
EnableInternetAccess.Event += static (sender, e) => LogValueChange(e, nameof(EnableInternetAccess));
|
||||
EnableInternetAccess.LogChangesToValue(nameof(EnableInternetAccess));
|
||||
EnableFsIntegrityChecks = new ReactiveObject<bool>();
|
||||
EnableFsIntegrityChecks.Event += static (sender, e) => LogValueChange(e, nameof(EnableFsIntegrityChecks));
|
||||
EnableFsIntegrityChecks.LogChangesToValue(nameof(EnableFsIntegrityChecks));
|
||||
FsGlobalAccessLogMode = new ReactiveObject<int>();
|
||||
FsGlobalAccessLogMode.Event += static (sender, e) => LogValueChange(e, nameof(FsGlobalAccessLogMode));
|
||||
FsGlobalAccessLogMode.LogChangesToValue(nameof(FsGlobalAccessLogMode));
|
||||
AudioBackend = new ReactiveObject<AudioBackend>();
|
||||
AudioBackend.Event += static (sender, e) => LogValueChange(e, nameof(AudioBackend));
|
||||
AudioBackend.LogChangesToValue(nameof(AudioBackend));
|
||||
MemoryManagerMode = new ReactiveObject<MemoryManagerMode>();
|
||||
MemoryManagerMode.Event += static (sender, e) => LogValueChange(e, nameof(MemoryManagerMode));
|
||||
MemoryManagerMode.LogChangesToValue(nameof(MemoryManagerMode));
|
||||
DramSize = new ReactiveObject<MemoryConfiguration>();
|
||||
DramSize.Event += static (sender, e) => LogValueChange(e, nameof(DramSize));
|
||||
DramSize.LogChangesToValue(nameof(DramSize));
|
||||
IgnoreMissingServices = new ReactiveObject<bool>();
|
||||
IgnoreMissingServices.Event += static (sender, e) => LogValueChange(e, nameof(IgnoreMissingServices));
|
||||
IgnoreMissingServices.LogChangesToValue(nameof(IgnoreMissingServices));
|
||||
AudioVolume = new ReactiveObject<float>();
|
||||
AudioVolume.Event += static (sender, e) => LogValueChange(e, nameof(AudioVolume));
|
||||
AudioVolume.LogChangesToValue(nameof(AudioVolume));
|
||||
UseHypervisor = new ReactiveObject<bool>();
|
||||
UseHypervisor.Event += static (sender, e) => LogValueChange(e, nameof(UseHypervisor));
|
||||
UseHypervisor.LogChangesToValue(nameof(UseHypervisor));
|
||||
}
|
||||
}
|
||||
|
||||
@ -524,36 +527,36 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
public GraphicsSection()
|
||||
{
|
||||
BackendThreading = new ReactiveObject<BackendThreading>();
|
||||
BackendThreading.Event += static (_, e) => LogValueChange(e, nameof(BackendThreading));
|
||||
BackendThreading.LogChangesToValue(nameof(BackendThreading));
|
||||
ResScale = new ReactiveObject<int>();
|
||||
ResScale.Event += static (_, e) => LogValueChange(e, nameof(ResScale));
|
||||
ResScale.LogChangesToValue(nameof(ResScale));
|
||||
ResScaleCustom = new ReactiveObject<float>();
|
||||
ResScaleCustom.Event += static (_, e) => LogValueChange(e, nameof(ResScaleCustom));
|
||||
ResScaleCustom.LogChangesToValue(nameof(ResScaleCustom));
|
||||
MaxAnisotropy = new ReactiveObject<float>();
|
||||
MaxAnisotropy.Event += static (_, e) => LogValueChange(e, nameof(MaxAnisotropy));
|
||||
MaxAnisotropy.LogChangesToValue(nameof(MaxAnisotropy));
|
||||
AspectRatio = new ReactiveObject<AspectRatio>();
|
||||
AspectRatio.Event += static (_, e) => LogValueChange(e, nameof(AspectRatio));
|
||||
AspectRatio.LogChangesToValue(nameof(AspectRatio));
|
||||
ShadersDumpPath = new ReactiveObject<string>();
|
||||
EnableVsync = new ReactiveObject<bool>();
|
||||
EnableVsync.Event += static (_, e) => LogValueChange(e, nameof(EnableVsync));
|
||||
EnableVsync.LogChangesToValue(nameof(EnableVsync));
|
||||
EnableShaderCache = new ReactiveObject<bool>();
|
||||
EnableShaderCache.Event += static (_, e) => LogValueChange(e, nameof(EnableShaderCache));
|
||||
EnableShaderCache.LogChangesToValue(nameof(EnableShaderCache));
|
||||
EnableTextureRecompression = new ReactiveObject<bool>();
|
||||
EnableTextureRecompression.Event += static (_, e) => LogValueChange(e, nameof(EnableTextureRecompression));
|
||||
EnableTextureRecompression.LogChangesToValue(nameof(EnableTextureRecompression));
|
||||
GraphicsBackend = new ReactiveObject<GraphicsBackend>();
|
||||
GraphicsBackend.Event += static (_, e) => LogValueChange(e, nameof(GraphicsBackend));
|
||||
GraphicsBackend.LogChangesToValue(nameof(GraphicsBackend));
|
||||
PreferredGpu = new ReactiveObject<string>();
|
||||
PreferredGpu.Event += static (_, e) => LogValueChange(e, nameof(PreferredGpu));
|
||||
PreferredGpu.LogChangesToValue(nameof(PreferredGpu));
|
||||
EnableMacroHLE = new ReactiveObject<bool>();
|
||||
EnableMacroHLE.Event += static (_, e) => LogValueChange(e, nameof(EnableMacroHLE));
|
||||
EnableMacroHLE.LogChangesToValue(nameof(EnableMacroHLE));
|
||||
EnableColorSpacePassthrough = new ReactiveObject<bool>();
|
||||
EnableColorSpacePassthrough.Event += static (_, e) => LogValueChange(e, nameof(EnableColorSpacePassthrough));
|
||||
EnableColorSpacePassthrough.LogChangesToValue(nameof(EnableColorSpacePassthrough));
|
||||
AntiAliasing = new ReactiveObject<AntiAliasing>();
|
||||
AntiAliasing.Event += static (_, e) => LogValueChange(e, nameof(AntiAliasing));
|
||||
AntiAliasing.LogChangesToValue(nameof(AntiAliasing));
|
||||
ScalingFilter = new ReactiveObject<ScalingFilter>();
|
||||
ScalingFilter.Event += static (_, e) => LogValueChange(e, nameof(ScalingFilter));
|
||||
ScalingFilter.LogChangesToValue(nameof(ScalingFilter));
|
||||
ScalingFilterLevel = new ReactiveObject<int>();
|
||||
ScalingFilterLevel.Event += static (_, e) => LogValueChange(e, nameof(ScalingFilterLevel));
|
||||
ScalingFilterLevel.LogChangesToValue(nameof(ScalingFilterLevel));
|
||||
}
|
||||
}
|
||||
|
||||
@ -576,7 +579,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
{
|
||||
LanInterfaceId = new ReactiveObject<string>();
|
||||
Mode = new ReactiveObject<MultiplayerMode>();
|
||||
Mode.Event += static (_, e) => LogValueChange(e, nameof(MultiplayerMode));
|
||||
Mode.LogChangesToValue(nameof(MultiplayerMode));
|
||||
}
|
||||
}
|
||||
|
||||
@ -667,6 +670,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
CheckUpdatesOnStart = new ReactiveObject<bool>();
|
||||
ShowConfirmExit = new ReactiveObject<bool>();
|
||||
IgnoreApplet = new ReactiveObject<bool>();
|
||||
IgnoreApplet.LogChangesToValue(nameof(IgnoreApplet));
|
||||
RememberWindowState = new ReactiveObject<bool>();
|
||||
ShowTitleBar = new ReactiveObject<bool>();
|
||||
EnableHardwareAcceleration = new ReactiveObject<bool>();
|
||||
@ -1654,13 +1658,6 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
return GraphicsBackend.OpenGl;
|
||||
}
|
||||
|
||||
private static void LogValueChange<T>(ReactiveEventArgs<T> eventArgs, string valueName)
|
||||
{
|
||||
string message = string.Create(CultureInfo.InvariantCulture, $"{valueName} set to: {eventArgs.NewValue}");
|
||||
|
||||
Ryujinx.Common.Logging.Logger.Info?.Print(LogClass.Configuration, message);
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if (Instance != null)
|
||||
|
@ -163,6 +163,7 @@ namespace Ryujinx.UI.Common
|
||||
"010036b0034e4000", // Super Mario Party
|
||||
"01006fe013472000", // Mario Party Superstars
|
||||
"0100965017338000", // Super Mario Party Jamboree
|
||||
"01006d0017f7a000", // Mario & Luigi: Brothership
|
||||
"010067300059a000", // Mario + Rabbids: Kingdom Battle
|
||||
"0100317013770000", // Mario + Rabbids: Sparks of Hope
|
||||
"0100a3900c3e2000", // Paper Mario: The Origami King
|
||||
|
@ -4,6 +4,7 @@ using Ryujinx.Common.Logging;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
@ -23,6 +24,26 @@ namespace Ryujinx.UI.Common.Helper
|
||||
public static partial void SHChangeNotify(uint wEventId, uint uFlags, nint dwItem1, nint dwItem2);
|
||||
|
||||
public static bool IsTypeAssociationSupported => (OperatingSystem.IsLinux() || OperatingSystem.IsWindows()) && !ReleaseInformation.IsFlatHubBuild;
|
||||
|
||||
public static bool AreMimeTypesRegistered
|
||||
{
|
||||
get
|
||||
{
|
||||
if (OperatingSystem.IsLinux())
|
||||
{
|
||||
return AreMimeTypesRegisteredLinux();
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
return AreMimeTypesRegisteredWindows();
|
||||
}
|
||||
|
||||
// TODO: Add macOS support.
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[SupportedOSPlatform("linux")]
|
||||
private static bool AreMimeTypesRegisteredLinux() => File.Exists(Path.Combine(_mimeDbPath, "packages", "Ryujinx.xml"));
|
||||
@ -72,6 +93,10 @@ namespace Ryujinx.UI.Common.Helper
|
||||
[SupportedOSPlatform("windows")]
|
||||
private static bool AreMimeTypesRegisteredWindows()
|
||||
{
|
||||
return _fileExtensions.Aggregate(false,
|
||||
(current, ext) => current | CheckRegistering(ext)
|
||||
);
|
||||
|
||||
static bool CheckRegistering(string ext)
|
||||
{
|
||||
RegistryKey key = Registry.CurrentUser.OpenSubKey(@$"Software\Classes\{ext}");
|
||||
@ -87,20 +112,20 @@ namespace Ryujinx.UI.Common.Helper
|
||||
|
||||
return keyValue is not null && (keyValue.Contains("Ryujinx") || keyValue.Contains(AppDomain.CurrentDomain.FriendlyName));
|
||||
}
|
||||
|
||||
bool registered = false;
|
||||
|
||||
foreach (string ext in _fileExtensions)
|
||||
{
|
||||
registered |= CheckRegistering(ext);
|
||||
}
|
||||
|
||||
return registered;
|
||||
}
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
private static bool InstallWindowsMimeTypes(bool uninstall = false)
|
||||
{
|
||||
bool registered = _fileExtensions.Aggregate(false,
|
||||
(current, ext) => current | RegisterExtension(ext, uninstall)
|
||||
);
|
||||
|
||||
// Notify Explorer the file association has been changed.
|
||||
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_FLUSH, nint.Zero, nint.Zero);
|
||||
|
||||
return registered;
|
||||
|
||||
static bool RegisterExtension(string ext, bool uninstall = false)
|
||||
{
|
||||
string keyString = @$"Software\Classes\{ext}";
|
||||
@ -127,42 +152,13 @@ namespace Ryujinx.UI.Common.Helper
|
||||
|
||||
Logger.Debug?.Print(LogClass.Application, $"Adding type association {ext}");
|
||||
using var openCmd = key.CreateSubKey(@"shell\open\command");
|
||||
openCmd.SetValue("", $"\"{Environment.ProcessPath}\" \"%1\"");
|
||||
openCmd.SetValue(string.Empty, $"\"{Environment.ProcessPath}\" \"%1\"");
|
||||
Logger.Debug?.Print(LogClass.Application, $"Added type association {ext}");
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool registered = false;
|
||||
|
||||
foreach (string ext in _fileExtensions)
|
||||
{
|
||||
registered |= RegisterExtension(ext, uninstall);
|
||||
}
|
||||
|
||||
// Notify Explorer the file association has been changed.
|
||||
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_FLUSH, nint.Zero, nint.Zero);
|
||||
|
||||
return registered;
|
||||
}
|
||||
|
||||
public static bool AreMimeTypesRegistered()
|
||||
{
|
||||
if (OperatingSystem.IsLinux())
|
||||
{
|
||||
return AreMimeTypesRegisteredLinux();
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
return AreMimeTypesRegisteredWindows();
|
||||
}
|
||||
|
||||
// TODO: Add macOS support.
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool Install()
|
||||
|
@ -43,8 +43,8 @@ namespace Ryujinx.UI.Common.Models
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
else
|
||||
return this.Path == obj.Path;
|
||||
|
||||
return this.Path == obj.Path;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "تعيين لون الخلفية",
|
||||
"AvatarClose": "إغلاق",
|
||||
"ControllerSettingsLoadProfileToolTip": "تحميل الملف الشخصي",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "إضافة ملف شخصي",
|
||||
"ControllerSettingsRemoveProfileToolTip": "إزالة الملف الشخصي",
|
||||
"ControllerSettingsSaveProfileToolTip": "حفظ الملف الشخصي",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "حدث خطأ أثناء البحث عن بيانات الحفظ المحددة: {0}",
|
||||
"FolderDialogExtractTitle": "اختر المجلد الذي تريد الاستخراج إليه",
|
||||
"DialogNcaExtractionMessage": "استخراج قسم {0} من {1}...",
|
||||
"DialogNcaExtractionTitle": "ريوجينكس - مستخرج قسم NCA",
|
||||
"DialogNcaExtractionTitle": "مستخرج قسم NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "فشل الاستخراج. لم يكن NCA الرئيسي موجودا في الملف المحدد.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "فشل الاستخراج. اقرأ ملف التسجيل لمزيد من المعلومات.",
|
||||
"DialogNcaExtractionSuccessMessage": "تم الاستخراج بنجاح.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Hintergrundfarbe auswählen",
|
||||
"AvatarClose": "Schließen",
|
||||
"ControllerSettingsLoadProfileToolTip": "Lädt ein Profil",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Fügt ein Profil hinzu",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Entfernt ein Profil",
|
||||
"ControllerSettingsSaveProfileToolTip": "Speichert ein Profil",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Es ist ein Fehler beim Suchen der angegebenen Speicherdaten aufgetreten: {0}",
|
||||
"FolderDialogExtractTitle": "Wähle den Ordner, in welchen die Dateien entpackt werden sollen",
|
||||
"DialogNcaExtractionMessage": "Extrahiert {0} abschnitt von {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - NCA-Abschnitt-Extraktor",
|
||||
"DialogNcaExtractionTitle": "NCA-Abschnitt-Extraktor",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Extraktion fehlgeschlagen. Der Hauptheader der NCA war in der ausgewählten Datei nicht vorhanden.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Extraktion fehlgeschlagen. Überprüfe die Logs für weitere Informationen.",
|
||||
"DialogNcaExtractionSuccessMessage": "Extraktion erfolgreich abgeschlossen.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Ορισμός Χρώματος Φόντου",
|
||||
"AvatarClose": "Κλείσιμο",
|
||||
"ControllerSettingsLoadProfileToolTip": "Φόρτωση Προφίλ",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Προσθήκη Προφίλ",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Κατάργηση Προφίλ",
|
||||
"ControllerSettingsSaveProfileToolTip": "Αποθήκευση Προφίλ",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Σφάλμα κατά την εύρεση των αποθηκευμένων δεδομένων: {0}",
|
||||
"FolderDialogExtractTitle": "Επιλέξτε τον φάκελο στον οποίο θέλετε να εξαγάγετε",
|
||||
"DialogNcaExtractionMessage": "Εξαγωγή ενότητας {0} από {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - NCA Εξαγωγέας Τμημάτων",
|
||||
"DialogNcaExtractionTitle": "NCA Εξαγωγέας Τμημάτων",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Αποτυχία εξαγωγής. Η κύρια NCA δεν υπήρχε στο επιλεγμένο αρχείο.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Αποτυχία εξαγωγής. Διαβάστε το αρχείο καταγραφής για περισσότερες πληροφορίες.",
|
||||
"DialogNcaExtractionSuccessMessage": "Η εξαγωγή ολοκληρώθηκε με επιτυχία.",
|
||||
|
@ -413,6 +413,7 @@
|
||||
"AvatarSetBackgroundColor": "Set Background Color",
|
||||
"AvatarClose": "Close",
|
||||
"ControllerSettingsLoadProfileToolTip": "Load Profile",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Add Profile",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Remove Profile",
|
||||
"ControllerSettingsSaveProfileToolTip": "Save Profile",
|
||||
@ -443,7 +444,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "There was an error finding the specified savedata: {0}",
|
||||
"FolderDialogExtractTitle": "Choose the folder to extract into",
|
||||
"DialogNcaExtractionMessage": "Extracting {0} section from {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - NCA Section Extractor",
|
||||
"DialogNcaExtractionTitle": "NCA Section Extractor",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Extraction failure. The main NCA was not present in the selected file.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Extraction failed. Please check the log file for more details.",
|
||||
"DialogNcaExtractionSuccessMessage": "Extraction completed successfully.",
|
||||
@ -460,7 +461,7 @@
|
||||
"DialogUpdaterRestartMessage": "Do you want to restart Ryujinx now?",
|
||||
"DialogUpdaterNoInternetMessage": "You are not connected to the Internet!",
|
||||
"DialogUpdaterNoInternetSubMessage": "Please verify that you have a working Internet connection!",
|
||||
"DialogUpdaterDirtyBuildMessage": "You Cannot update a Dirty build of Ryujinx!",
|
||||
"DialogUpdaterDirtyBuildMessage": "You cannot update a Dirty build of Ryujinx!",
|
||||
"DialogUpdaterDirtyBuildSubMessage": "Please download Ryujinx at https://github.com/GreemDev/Ryujinx/releases/ if you are looking for a supported version.",
|
||||
"DialogRestartRequiredMessage": "Restart Required",
|
||||
"DialogThemeRestartMessage": "Theme has been saved. A restart is needed to apply the theme.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Establecer color de fondo",
|
||||
"AvatarClose": "Cerrar",
|
||||
"ControllerSettingsLoadProfileToolTip": "Cargar perfil",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Agregar perfil",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Eliminar perfil",
|
||||
"ControllerSettingsSaveProfileToolTip": "Guardar perfil",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Hubo un error encontrando los datos de guardado especificados: {0}",
|
||||
"FolderDialogExtractTitle": "Elige la carpeta en la que deseas extraer",
|
||||
"DialogNcaExtractionMessage": "Extrayendo {0} sección de {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - Extractor de sección NCA",
|
||||
"DialogNcaExtractionTitle": "Extractor de sección NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Fallo de extracción. El NCA principal no estaba presente en el archivo seleccionado.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Fallo de extracción. Lee el registro para más información.",
|
||||
"DialogNcaExtractionSuccessMessage": "Se completó la extracción con éxito.",
|
||||
|
@ -408,6 +408,7 @@
|
||||
"AvatarClose": "Fermer",
|
||||
"ControllerSettingsLoadProfileToolTip": "Charger un profil",
|
||||
"ControllerSettingsAddProfileToolTip": "Ajouter un profil",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Supprimer un profil",
|
||||
"ControllerSettingsSaveProfileToolTip": "Enregistrer un profil",
|
||||
"MenuBarFileToolsTakeScreenshot": "Prendre une capture d'écran",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Une erreur s'est produite lors de la recherche de la sauvegarde spécifiée : {0}",
|
||||
"FolderDialogExtractTitle": "Choisissez le dossier dans lequel extraire",
|
||||
"DialogNcaExtractionMessage": "Extraction de la section {0} depuis {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - Extracteur de la section NCA",
|
||||
"DialogNcaExtractionTitle": "Extracteur de la section NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Échec de l'extraction. Le NCA principal n'était pas présent dans le fichier sélectionné.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Échec de l'extraction. Lisez le fichier journal pour plus d'informations.",
|
||||
"DialogNcaExtractionSuccessMessage": "Extraction terminée avec succès.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "הגדר צבע רקע",
|
||||
"AvatarClose": "סגור",
|
||||
"ControllerSettingsLoadProfileToolTip": "טען פרופיל",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "הוסף פרופיל",
|
||||
"ControllerSettingsRemoveProfileToolTip": "הסר פרופיל",
|
||||
"ControllerSettingsSaveProfileToolTip": "שמור פרופיל",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "אירעה שגיאה במציאת שמור המשחק שצויין: {0}",
|
||||
"FolderDialogExtractTitle": "בחרו את התיקייה לחילוץ",
|
||||
"DialogNcaExtractionMessage": "מלחץ {0} ממקטע {1}...",
|
||||
"DialogNcaExtractionTitle": "ריוג'ינקס - מחלץ מקטע NCA",
|
||||
"DialogNcaExtractionTitle": "מחלץ מקטע NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "כשל בחילוץ. ה-NCA הראשי לא היה קיים בקובץ שנבחר.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "כשל בחילוץ. קרא את קובץ הרישום למידע נוסף.",
|
||||
"DialogNcaExtractionSuccessMessage": "החילוץ הושלם בהצלחה.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Imposta colore di sfondo",
|
||||
"AvatarClose": "Chiudi",
|
||||
"ControllerSettingsLoadProfileToolTip": "Carica profilo",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Aggiungi profilo",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Rimuovi profilo",
|
||||
"ControllerSettingsSaveProfileToolTip": "Salva profilo",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "C'è stato un errore durante la ricerca dei dati di salvataggio: {0}",
|
||||
"FolderDialogExtractTitle": "Scegli una cartella in cui estrarre",
|
||||
"DialogNcaExtractionMessage": "Estrazione della sezione {0} da {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - Estrazione sezione NCA",
|
||||
"DialogNcaExtractionTitle": "Estrazione sezione NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "L'estrazione è fallita. L'NCA principale non era presente nel file selezionato.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "L'estrazione è fallita. Consulta il file di log per maggiori informazioni.",
|
||||
"DialogNcaExtractionSuccessMessage": "Estrazione completata con successo.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "背景色を指定",
|
||||
"AvatarClose": "閉じる",
|
||||
"ControllerSettingsLoadProfileToolTip": "プロファイルをロード",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "プロファイルを追加",
|
||||
"ControllerSettingsRemoveProfileToolTip": "プロファイルを削除",
|
||||
"ControllerSettingsSaveProfileToolTip": "プロファイルをセーブ",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "セーブデータ: {0} の検索中にエラーが発生しました",
|
||||
"FolderDialogExtractTitle": "展開フォルダを選択",
|
||||
"DialogNcaExtractionMessage": "{1} から {0} セクションを展開中...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - NCA セクション展開",
|
||||
"DialogNcaExtractionTitle": "NCA セクション展開",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "展開に失敗しました. 選択されたファイルにはメイン NCA が存在しません.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "展開に失敗しました. 詳細はログを確認してください.",
|
||||
"DialogNcaExtractionSuccessMessage": "展開が正常終了しました",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "배경색 설정",
|
||||
"AvatarClose": "닫기",
|
||||
"ControllerSettingsLoadProfileToolTip": "프로필 불러오기",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "프로필 추가",
|
||||
"ControllerSettingsRemoveProfileToolTip": "프로필 제거",
|
||||
"ControllerSettingsSaveProfileToolTip": "프로필 저장",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "지정된 저장 데이터를 찾는 중에 오류 발생: {0}",
|
||||
"FolderDialogExtractTitle": "추출할 폴더 선택",
|
||||
"DialogNcaExtractionMessage": "{1}에서 {0} 섹션을 추출하는 중...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - NCA 섹션 추출기",
|
||||
"DialogNcaExtractionTitle": "NCA 섹션 추출기",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "추출 실패하였습니다. 선택한 파일에 기본 NCA가 없습니다.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "추출 실패하였습니다. 자세한 내용은 로그 파일을 읽으세요.",
|
||||
"DialogNcaExtractionSuccessMessage": "추출이 성공적으로 완료되었습니다.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Ustaw kolor tła",
|
||||
"AvatarClose": "Zamknij",
|
||||
"ControllerSettingsLoadProfileToolTip": "Wczytaj profil",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Dodaj profil",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Usuń profil",
|
||||
"ControllerSettingsSaveProfileToolTip": "Zapisz profil",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Wystąpił błąd podczas próby znalezienia określonych zapisanych danych: {0}",
|
||||
"FolderDialogExtractTitle": "Wybierz folder, do którego chcesz rozpakować",
|
||||
"DialogNcaExtractionMessage": "Wypakowywanie sekcji {0} z {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - Asystent wypakowania sekcji NCA",
|
||||
"DialogNcaExtractionTitle": "Asystent wypakowania sekcji NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Niepowodzenie podczas wypakowywania. W wybranym pliku nie było głównego NCA.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Niepowodzenie podczas wypakowywania. Przeczytaj plik dziennika, aby uzyskać więcej informacji.",
|
||||
"DialogNcaExtractionSuccessMessage": "Wypakowywanie zakończone pomyślnie.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Definir cor de fundo",
|
||||
"AvatarClose": "Fechar",
|
||||
"ControllerSettingsLoadProfileToolTip": "Carregar perfil",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Adicionar perfil",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Remover perfil",
|
||||
"ControllerSettingsSaveProfileToolTip": "Salvar perfil",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Ocorreu um erro ao tentar encontrar o diretório de salvamento: {0}",
|
||||
"FolderDialogExtractTitle": "Escolha o diretório onde os arquivos serão extraídos",
|
||||
"DialogNcaExtractionMessage": "Extraindo seção {0} de {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - Extrator de seções NCA",
|
||||
"DialogNcaExtractionTitle": "Extrator de seções NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Falha na extração. O NCA principal não foi encontrado no arquivo selecionado.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Falha na extração. Leia o arquivo de log para mais informações.",
|
||||
"DialogNcaExtractionSuccessMessage": "Extração concluída com êxito.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Установить цвет фона",
|
||||
"AvatarClose": "Закрыть",
|
||||
"ControllerSettingsLoadProfileToolTip": "Загрузить профиль",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Добавить профиль",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Удалить профиль",
|
||||
"ControllerSettingsSaveProfileToolTip": "Сохранить профиль",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Произошла ошибка при поиске указанных данных сохранения: {0}",
|
||||
"FolderDialogExtractTitle": "Выберите папку для извлечения",
|
||||
"DialogNcaExtractionMessage": "Извлечение {0} раздела из {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - Извлечение разделов NCA",
|
||||
"DialogNcaExtractionTitle": "Извлечение разделов NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Ошибка извлечения. Основной NCA не присутствовал в выбранном файле.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Ошибка извлечения. Прочтите файл журнала для получения дополнительной информации.",
|
||||
"DialogNcaExtractionSuccessMessage": "Извлечение завершено успешно.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "ตั้งค่าสีพื้นหลัง",
|
||||
"AvatarClose": "ปิด",
|
||||
"ControllerSettingsLoadProfileToolTip": "โหลด โปรไฟล์",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "เพิ่ม โปรไฟล์",
|
||||
"ControllerSettingsRemoveProfileToolTip": "ลบ โปรไฟล์",
|
||||
"ControllerSettingsSaveProfileToolTip": "บันทึก โปรไฟล์",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "มีข้อผิดพลาดในการค้นหาข้อมูลบันทึกที่ระบุไว้: {0}",
|
||||
"FolderDialogExtractTitle": "เลือกโฟลเดอร์ที่จะแตกไฟล์เข้าไป",
|
||||
"DialogNcaExtractionMessage": "กำลังแตกไฟล์ {0} จากส่วน {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - เครื่องมือแตกไฟล์ของ NCA",
|
||||
"DialogNcaExtractionTitle": "เครื่องมือแตกไฟล์ของ NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "เกิดความล้มเหลวในการแตกไฟล์เนื่องจากไม่พบ NCA หลักในไฟล์ที่เลือก",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "เกิดความล้มเหลวในการแตกไฟล์ โปรดอ่านไฟล์บันทึกประวัติเพื่อดูข้อมูลเพิ่มเติม",
|
||||
"DialogNcaExtractionSuccessMessage": "การแตกไฟล์เสร็จสมบูรณ์แล้ว",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Arka Plan Rengi Ayarla",
|
||||
"AvatarClose": "Kapat",
|
||||
"ControllerSettingsLoadProfileToolTip": "Profil Yükle",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Profil Ekle",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Profili Kaldır",
|
||||
"ControllerSettingsSaveProfileToolTip": "Profili Kaydet",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Belirtilen kayıt verisi bulunmaya çalışırken hata: {0}",
|
||||
"FolderDialogExtractTitle": "İçine ayıklanacak klasörü seç",
|
||||
"DialogNcaExtractionMessage": "{1} den {0} kısmı ayıklanıyor...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - NCA Kısmı Ayıklayıcısı",
|
||||
"DialogNcaExtractionTitle": "NCA Kısmı Ayıklayıcısı",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Ayıklama hatası. Ana NCA seçilen dosyada bulunamadı.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Ayıklama hatası. Ek bilgi için kayıt dosyasını okuyun.",
|
||||
"DialogNcaExtractionSuccessMessage": "Ayıklama başarıyla tamamlandı.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "Встановити колір фону",
|
||||
"AvatarClose": "Закрити",
|
||||
"ControllerSettingsLoadProfileToolTip": "Завантажити профіль",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "Додати профіль",
|
||||
"ControllerSettingsRemoveProfileToolTip": "Видалити профіль",
|
||||
"ControllerSettingsSaveProfileToolTip": "Зберегти профіль",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "Під час пошуку вказаних даних збереження сталася помилка: {0}",
|
||||
"FolderDialogExtractTitle": "Виберіть папку для видобування",
|
||||
"DialogNcaExtractionMessage": "Видобування розділу {0} з {1}...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - Екстрактор розділів NCA",
|
||||
"DialogNcaExtractionTitle": "Екстрактор розділів NCA",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "Помилка видобування. Основний NCA не був присутній у вибраному файлі.",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "Помилка видобування. Прочитайте файл журналу для отримання додаткової інформації.",
|
||||
"DialogNcaExtractionSuccessMessage": "Видобування успішно завершено.",
|
||||
|
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "设置背景色",
|
||||
"AvatarClose": "关闭",
|
||||
"ControllerSettingsLoadProfileToolTip": "加载配置文件",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "新增配置文件",
|
||||
"ControllerSettingsRemoveProfileToolTip": "删除配置文件",
|
||||
"ControllerSettingsSaveProfileToolTip": "保存配置文件",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "查找指定存档时出错:{0}",
|
||||
"FolderDialogExtractTitle": "选择要提取到的文件夹",
|
||||
"DialogNcaExtractionMessage": "提取 {1} 的 {0} 分区...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - NCA 分区提取",
|
||||
"DialogNcaExtractionTitle": "NCA 分区提取",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "提取失败,所选文件中没有 NCA 文件",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "提取失败,请查看日志文件获取详情",
|
||||
"DialogNcaExtractionSuccessMessage": "提取成功!",
|
||||
|
@ -10,10 +10,10 @@
|
||||
"SettingsTabSystemUseHypervisor": "使用 Hypervisor",
|
||||
"MenuBarFile": "檔案(_F)",
|
||||
"MenuBarFileOpenFromFile": "從檔案載入應用程式(_L)",
|
||||
"MenuBarFileOpenFromFileError": "No applications found in selected file.",
|
||||
"MenuBarFileOpenFromFileError": "未能從已選擇的檔案中找到應用程式。",
|
||||
"MenuBarFileOpenUnpacked": "載入未封裝的遊戲(_U)",
|
||||
"MenuBarFileLoadDlcFromFolder": "Load DLC From Folder",
|
||||
"MenuBarFileLoadTitleUpdatesFromFolder": "Load Title Updates From Folder",
|
||||
"MenuBarFileLoadDlcFromFolder": "從資料夾中載入 DLC",
|
||||
"MenuBarFileLoadTitleUpdatesFromFolder": "從資料夾中載入遊戲更新",
|
||||
"MenuBarFileOpenEmuFolder": "開啟 Ryujinx 資料夾",
|
||||
"MenuBarFileOpenLogsFolder": "開啟日誌資料夾",
|
||||
"MenuBarFileExit": "結束(_E)",
|
||||
@ -100,14 +100,14 @@
|
||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "啟動時檢查更新",
|
||||
"SettingsTabGeneralShowConfirmExitDialog": "顯示「確認結束」對話方塊",
|
||||
"SettingsTabGeneralRememberWindowState": "記住視窗大小/位置",
|
||||
"SettingsTabGeneralShowTitleBar": "Show Title Bar (Requires restart)",
|
||||
"SettingsTabGeneralShowTitleBar": "顯示「標題列」 (需要重新開啟Ryujinx)",
|
||||
"SettingsTabGeneralHideCursor": "隱藏滑鼠游標:",
|
||||
"SettingsTabGeneralHideCursorNever": "從不",
|
||||
"SettingsTabGeneralHideCursorOnIdle": "閒置時",
|
||||
"SettingsTabGeneralHideCursorAlways": "總是",
|
||||
"SettingsTabGeneralGameDirectories": "遊戲資料夾",
|
||||
"SettingsTabGeneralAutoloadDirectories": "Autoload DLC/Updates Directories",
|
||||
"SettingsTabGeneralAutoloadNote": "DLC and Updates which refer to missing files will be unloaded automatically",
|
||||
"SettingsTabGeneralAutoloadDirectories": "自動載入 DLC/遊戲更新資料夾",
|
||||
"SettingsTabGeneralAutoloadNote": "遺失的 DLC 及遊戲更新檔案將會在自動載入中移除",
|
||||
"SettingsTabGeneralAdd": "新增",
|
||||
"SettingsTabGeneralRemove": "刪除",
|
||||
"SettingsTabSystem": "系統",
|
||||
@ -142,7 +142,7 @@
|
||||
"SettingsTabSystemSystemTime": "系統時鐘:",
|
||||
"SettingsTabSystemEnableVsync": "垂直同步",
|
||||
"SettingsTabSystemEnablePptc": "PPTC (剖析式持久轉譯快取, Profiled Persistent Translation Cache)",
|
||||
"SettingsTabSystemEnableLowPowerPptc": "Low-power PPTC",
|
||||
"SettingsTabSystemEnableLowPowerPptc": "低功耗 PPTC",
|
||||
"SettingsTabSystemEnableFsIntegrityChecks": "檔案系統完整性檢查",
|
||||
"SettingsTabSystemAudioBackend": "音效後端:",
|
||||
"SettingsTabSystemAudioBackendDummy": "虛設 (Dummy)",
|
||||
@ -407,6 +407,7 @@
|
||||
"AvatarSetBackgroundColor": "設定背景顏色",
|
||||
"AvatarClose": "關閉",
|
||||
"ControllerSettingsLoadProfileToolTip": "載入設定檔",
|
||||
"ControllerSettingsViewProfileToolTip": "View Profile",
|
||||
"ControllerSettingsAddProfileToolTip": "新增設定檔",
|
||||
"ControllerSettingsRemoveProfileToolTip": "刪除設定檔",
|
||||
"ControllerSettingsSaveProfileToolTip": "儲存設定檔",
|
||||
@ -416,7 +417,7 @@
|
||||
"GameListContextMenuToggleFavorite": "加入/移除為我的最愛",
|
||||
"GameListContextMenuToggleFavoriteToolTip": "切換遊戲的我的最愛狀態",
|
||||
"SettingsTabGeneralTheme": "佈景主題:",
|
||||
"SettingsTabGeneralThemeAuto": "Auto",
|
||||
"SettingsTabGeneralThemeAuto": "自動",
|
||||
"SettingsTabGeneralThemeDark": "深色",
|
||||
"SettingsTabGeneralThemeLight": "淺色",
|
||||
"ControllerSettingsConfigureGeneral": "配置",
|
||||
@ -437,7 +438,7 @@
|
||||
"DialogMessageFindSaveErrorMessage": "尋找指定的存檔時出現錯誤: {0}",
|
||||
"FolderDialogExtractTitle": "選擇要解壓到的資料夾",
|
||||
"DialogNcaExtractionMessage": "從 {1} 提取 {0} 分區...",
|
||||
"DialogNcaExtractionTitle": "Ryujinx - NCA 分區提取器",
|
||||
"DialogNcaExtractionTitle": "NCA 分區提取器",
|
||||
"DialogNcaExtractionMainNcaNotFoundErrorMessage": "提取失敗。所選檔案中不存在主 NCA 檔案。",
|
||||
"DialogNcaExtractionCheckLogErrorMessage": "提取失敗。請閱讀日誌檔案了解更多資訊。",
|
||||
"DialogNcaExtractionSuccessMessage": "提取成功。",
|
||||
@ -567,9 +568,9 @@
|
||||
"AddGameDirBoxTooltip": "輸入要新增到清單中的遊戲資料夾",
|
||||
"AddGameDirTooltip": "新增遊戲資料夾到清單中",
|
||||
"RemoveGameDirTooltip": "移除選取的遊戲資料夾",
|
||||
"AddAutoloadDirBoxTooltip": "Enter an autoload directory to add to the list",
|
||||
"AddAutoloadDirTooltip": "Add an autoload directory to the list",
|
||||
"RemoveAutoloadDirTooltip": "Remove selected autoload directory",
|
||||
"AddAutoloadDirBoxTooltip": "輸入要新增到清單中的「自動載入 DLC/遊戲更新資料夾」",
|
||||
"AddAutoloadDirTooltip": "新增「自動載入 DLC/遊戲更新資料夾」到清單中",
|
||||
"RemoveAutoloadDirTooltip": "移除選取的「自動載入 DLC/遊戲更新資料夾」",
|
||||
"CustomThemeCheckTooltip": "為圖形使用者介面使用自訂 Avalonia 佈景主題,變更模擬器功能表的外觀",
|
||||
"CustomThemePathTooltip": "自訂 GUI 佈景主題的路徑",
|
||||
"CustomThemeBrowseTooltip": "瀏覽自訂 GUI 佈景主題",
|
||||
@ -582,7 +583,7 @@
|
||||
"TimeTooltip": "變更系統時鐘",
|
||||
"VSyncToggleTooltip": "模擬遊戲機的垂直同步。對大多數遊戲來說,它本質上是一個幀率限制器;停用它可能會導致遊戲以更高的速度執行,或使載入畫面耗時更長或卡住。\n\n可以在遊戲中使用快速鍵進行切換 (預設為 F1)。如果您打算停用,我們建議您這樣做。\n\n如果不確定,請保持開啟狀態。",
|
||||
"PptcToggleTooltip": "儲存已轉譯的 JIT 函數,這樣每次載入遊戲時就無需再轉譯這些函數。\n\n減少遊戲首次啟動後的卡頓現象,並大大加快啟動時間。\n\n如果不確定,請保持開啟狀態。",
|
||||
"LowPowerPptcToggleTooltip": "Load the PPTC using a third of the amount of cores.",
|
||||
"LowPowerPptcToggleTooltip": "使用 CPU 核心數量的三分之一載入 PPTC。",
|
||||
"FsIntegrityToggleTooltip": "在啟動遊戲時檢查損壞的檔案,如果檢測到損壞的檔案,則在日誌中顯示雜湊值錯誤。\n\n對效能沒有影響,旨在幫助排除故障。\n\n如果不確定,請保持開啟狀態。",
|
||||
"AudioBackendTooltip": "變更用於繪製音訊的後端。\n\nSDL2 是首選,而 OpenAL 和 SoundIO 則作為備用。虛設 (Dummy) 將沒有聲音。\n\n如果不確定,請設定為 SDL2。",
|
||||
"MemoryManagerTooltip": "變更客體記憶體的映射和存取方式。這會極大地影響模擬 CPU 效能。\n\n如果不確定,請設定為主體略過檢查模式。",
|
||||
@ -590,7 +591,7 @@
|
||||
"MemoryManagerHostTooltip": "直接映射主體位址空間中的記憶體。更快的 JIT 編譯和執行速度。",
|
||||
"MemoryManagerUnsafeTooltip": "直接映射記憶體,但在存取前不封鎖客體位址空間內的位址。速度更快,但相對不安全。訪客應用程式可以從 Ryujinx 中的任何地方存取記憶體,因此只能使用該模式執行您信任的程式。",
|
||||
"UseHypervisorTooltip": "使用 Hypervisor 取代 JIT。使用時可大幅提高效能,但在目前狀態下可能不穩定。",
|
||||
"DRamTooltip": "利用另一種 MemoryMode 配置來模仿 Switch 開發模式。\n\n這僅對高解析度紋理套件或 4K 解析度模組有用。不會提高效能。\n\n如果不確定,請保持關閉狀態。",
|
||||
"DRamTooltip": "利用另一種 MemoryMode 配置來模仿 Switch 開發模式。\n\n這僅對高解析度紋理套件或 4K 解析度模組有用。不會提高效能。\n\n如果不確定,請設定為 4GiB。",
|
||||
"IgnoreMissingServicesTooltip": "忽略未實現的 Horizon OS 服務。這可能有助於在啟動某些遊戲時避免崩潰。\n\n如果不確定,請保持關閉狀態。",
|
||||
"IgnoreAppletTooltip": "如果遊戲手把在遊戲過程中斷開連接,則外部對話方塊「控制器小程式」將不會出現。不會提示關閉對話方塊或設定新控制器。一旦先前斷開的控制器重新連接,遊戲將自動恢復。",
|
||||
"GraphicsBackendThreadingTooltip": "在第二個執行緒上執行圖形後端指令。\n\n在本身不支援多執行緒的 GPU 驅動程式上,可加快著色器編譯、減少卡頓並提高效能。在支援多執行緒的驅動程式上效能略有提升。\n\n如果不確定,請設定為自動。",
|
||||
@ -615,8 +616,8 @@
|
||||
"DebugLogTooltip": "在控制台中輸出偵錯日誌訊息。\n\n只有在人員特別指示的情況下才能使用,因為這會導致日誌難以閱讀,並降低模擬器效能。",
|
||||
"LoadApplicationFileTooltip": "開啟檔案總管,選擇與 Switch 相容的檔案來載入",
|
||||
"LoadApplicationFolderTooltip": "開啟檔案總管,選擇與 Switch 相容且未封裝的應用程式來載入",
|
||||
"LoadDlcFromFolderTooltip": "Open a file explorer to choose one or more folders to bulk load DLC from",
|
||||
"LoadTitleUpdatesFromFolderTooltip": "Open a file explorer to choose one or more folders to bulk load title updates from",
|
||||
"LoadDlcFromFolderTooltip": "開啟檔案總管,選擇一個或多個資料夾來大量載入 DLC",
|
||||
"LoadTitleUpdatesFromFolderTooltip": "開啟檔案總管,選擇一個或多個資料夾來大量載入遊戲更新",
|
||||
"OpenRyujinxFolderTooltip": "開啟 Ryujinx 檔案系統資料夾",
|
||||
"OpenRyujinxLogsTooltip": "開啟日誌被寫入的資料夾",
|
||||
"ExitTooltip": "結束 Ryujinx",
|
||||
@ -668,8 +669,8 @@
|
||||
"OpenSetupGuideMessage": "開啟設定指南",
|
||||
"NoUpdate": "沒有更新",
|
||||
"TitleUpdateVersionLabel": "版本 {0}",
|
||||
"TitleBundledUpdateVersionLabel": "Bundled: Version {0}",
|
||||
"TitleBundledDlcLabel": "Bundled:",
|
||||
"TitleBundledUpdateVersionLabel": "附帶: 版本 {0}",
|
||||
"TitleBundledDlcLabel": "附帶:",
|
||||
"RyujinxInfo": "Ryujinx - 資訊",
|
||||
"RyujinxConfirm": "Ryujinx - 確認",
|
||||
"FileDialogAllTypes": "全部類型",
|
||||
@ -727,17 +728,17 @@
|
||||
"DlcWindowTitle": "管理 {0} 的可下載內容 ({1})",
|
||||
"ModWindowTitle": "管理 {0} 的模組 ({1})",
|
||||
"UpdateWindowTitle": "遊戲更新管理員",
|
||||
"UpdateWindowUpdateAddedMessage": "{0} new update(s) added",
|
||||
"UpdateWindowBundledContentNotice": "Bundled updates cannot be removed, only disabled.",
|
||||
"UpdateWindowUpdateAddedMessage": "已加入 {0} 個遊戲更新",
|
||||
"UpdateWindowBundledContentNotice": "附帶的遊戲更新只能被停用而無法被刪除。",
|
||||
"CheatWindowHeading": "可用於 {0} [{1}] 的密技",
|
||||
"BuildId": "組建識別碼:",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"DlcWindowBundledContentNotice": "附帶的 DLC 只能被停用而無法被刪除。",
|
||||
"DlcWindowHeading": "{0} 個可下載內容",
|
||||
"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",
|
||||
"AutoloadUpdateRemovedMessage": "{0} missing update(s) removed",
|
||||
"DlcWindowDlcAddedMessage": "已加入 {0} 個 DLC",
|
||||
"AutoloadDlcAddedMessage": "已加入 {0} 個 DLC",
|
||||
"AutoloadDlcRemovedMessage": "已刪除 {0} 個遺失的 DLC",
|
||||
"AutoloadUpdateAddedMessage": "已加入 {0} 個遊戲更新",
|
||||
"AutoloadUpdateRemovedMessage": "已刪除 {0} 個遺失的遊戲更新",
|
||||
"ModWindowHeading": "{0} 模組",
|
||||
"UserProfilesEditProfile": "編輯所選",
|
||||
"Cancel": "取消",
|
||||
|
@ -146,7 +146,7 @@ namespace Ryujinx.Ava.Common
|
||||
var cancellationToken = new CancellationTokenSource();
|
||||
|
||||
UpdateWaitWindow waitingDialog = new(
|
||||
LocaleManager.Instance[LocaleKeys.DialogNcaExtractionTitle],
|
||||
App.FormatTitle(LocaleKeys.DialogNcaExtractionTitle),
|
||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogNcaExtractionMessage, ncaSectionType, Path.GetFileName(titleFilePath)),
|
||||
cancellationToken);
|
||||
|
||||
@ -269,7 +269,7 @@ namespace Ryujinx.Ava.Common
|
||||
Dispatcher.UIThread.Post(waitingDialog.Close);
|
||||
|
||||
NotificationHelper.Show(
|
||||
LocaleManager.Instance[LocaleKeys.DialogNcaExtractionTitle],
|
||||
App.FormatTitle(LocaleKeys.DialogNcaExtractionTitle),
|
||||
$"{titleName}\n\n{LocaleManager.Instance[LocaleKeys.DialogNcaExtractionSuccessMessage]}",
|
||||
NotificationType.Information);
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ namespace Ryujinx.Ava
|
||||
// Delete backup files after updating.
|
||||
Task.Run(Updater.CleanupUpdate);
|
||||
|
||||
Console.Title = $"Ryujinx Console {Version}";
|
||||
Console.Title = $"{App.FullAppName} Console {Version}";
|
||||
|
||||
// Hook unhandled exception and process exit events.
|
||||
AppDomain.CurrentDomain.UnhandledException += (sender, e)
|
||||
|
@ -226,6 +226,24 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
(int)Symbol.Help,
|
||||
primaryButtonResult);
|
||||
|
||||
internal static async Task<UserResult> CreateDeniableConfirmationDialog(
|
||||
string primaryText,
|
||||
string secondaryText,
|
||||
string acceptButtonText,
|
||||
string noAcceptButtonText,
|
||||
string cancelButtonText,
|
||||
string title,
|
||||
UserResult primaryButtonResult = UserResult.Yes)
|
||||
=> await ShowTextDialog(
|
||||
string.IsNullOrWhiteSpace(title) ? LocaleManager.Instance[LocaleKeys.DialogConfirmationTitle] : title,
|
||||
primaryText,
|
||||
secondaryText,
|
||||
acceptButtonText,
|
||||
noAcceptButtonText,
|
||||
cancelButtonText,
|
||||
(int)Symbol.Help,
|
||||
primaryButtonResult);
|
||||
|
||||
internal static async Task<UserResult> CreateLocalizedConfirmationDialog(string primaryText, string secondaryText)
|
||||
=> await CreateConfirmationDialog(
|
||||
primaryText,
|
||||
|
@ -44,6 +44,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
private readonly MainWindow _mainWindow;
|
||||
|
||||
private PlayerIndex _playerId;
|
||||
private PlayerIndex _playerIdChoose;
|
||||
private int _controller;
|
||||
private string _controllerImage;
|
||||
private int _device;
|
||||
@ -83,6 +84,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
}
|
||||
}
|
||||
|
||||
public PlayerIndex PlayerIdChoose
|
||||
{
|
||||
get => _playerIdChoose;
|
||||
set { }
|
||||
}
|
||||
|
||||
public PlayerIndex PlayerId
|
||||
{
|
||||
get => _playerId;
|
||||
@ -90,6 +97,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
{
|
||||
if (IsModified)
|
||||
{
|
||||
|
||||
_playerIdChoose = value;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -99,7 +108,9 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
if (!Enum.IsDefined(typeof(PlayerIndex), _playerId))
|
||||
{
|
||||
_playerId = PlayerIndex.Player1;
|
||||
|
||||
}
|
||||
_isLoaded = false;
|
||||
|
||||
LoadConfiguration();
|
||||
LoadDevice();
|
||||
|
@ -802,6 +802,11 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
get => FileAssociationHelper.IsTypeAssociationSupported;
|
||||
}
|
||||
|
||||
public bool AreMimeTypesRegistered
|
||||
{
|
||||
get => FileAssociationHelper.AreMimeTypesRegistered;
|
||||
}
|
||||
|
||||
public ObservableCollectionExtended<ApplicationData> Applications
|
||||
{
|
||||
|
@ -4,11 +4,14 @@ using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.LogicalTree;
|
||||
using DiscordRPC;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.ViewModels.Input;
|
||||
using Ryujinx.Common.Configuration.Hid.Controller;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Input;
|
||||
using Ryujinx.Input.Assigner;
|
||||
using System;
|
||||
using StickInputId = Ryujinx.Common.Configuration.Hid.Controller.StickInputId;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.Input
|
||||
@ -23,9 +26,17 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
foreach (ILogical visual in SettingButtons.GetLogicalDescendants())
|
||||
{
|
||||
if (visual is ToggleButton button and not CheckBox)
|
||||
switch (visual)
|
||||
{
|
||||
button.IsCheckedChanged += Button_IsCheckedChanged;
|
||||
case ToggleButton button and not CheckBox:
|
||||
button.IsCheckedChanged += Button_IsCheckedChanged;
|
||||
break;
|
||||
case CheckBox check:
|
||||
check.IsCheckedChanged += CheckBox_IsCheckedChanged;
|
||||
break;
|
||||
case Slider slider:
|
||||
slider.PropertyChanged += Slider_ValueChanged;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -34,17 +45,49 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
{
|
||||
base.OnPointerReleased(e);
|
||||
|
||||
if (_currentAssigner != null && _currentAssigner.ToggledButton != null && !_currentAssigner.ToggledButton.IsPointerOver)
|
||||
if (_currentAssigner is { ToggledButton.IsPointerOver: false })
|
||||
{
|
||||
_currentAssigner.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private float _changeSlider = float.NaN;
|
||||
|
||||
private void Slider_ValueChanged(object sender, AvaloniaPropertyChangedEventArgs e)
|
||||
{
|
||||
if (sender is Slider check)
|
||||
{
|
||||
_changeSlider = check.IsPointerOver switch
|
||||
{
|
||||
true when float.IsNaN(_changeSlider) => (float)check.Value,
|
||||
false => float.NaN,
|
||||
_ => _changeSlider
|
||||
};
|
||||
|
||||
if (!float.IsNaN(_changeSlider) && _changeSlider != (float)check.Value)
|
||||
{
|
||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
||||
_changeSlider = (float)check.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBox_IsCheckedChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is CheckBox { IsPointerOver: true })
|
||||
{
|
||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
||||
_currentAssigner?.Cancel();
|
||||
_currentAssigner = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void Button_IsCheckedChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is ToggleButton button)
|
||||
if (sender is ToggleButton button)
|
||||
{
|
||||
if ((bool)button.IsChecked)
|
||||
if (button.IsChecked is true)
|
||||
{
|
||||
if (_currentAssigner != null && button == _currentAssigner.ToggledButton)
|
||||
{
|
||||
|
@ -108,7 +108,7 @@
|
||||
ToolTip.Tip="{ext:Locale ControllerSettingsLoadProfileToolTip}"
|
||||
Command="{Binding LoadProfile}">
|
||||
<ui:SymbolIcon
|
||||
Symbol="Upload"
|
||||
Symbol="View"
|
||||
FontSize="15"
|
||||
Height="20" />
|
||||
</Button>
|
||||
|
@ -25,17 +25,27 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
private async void PlayerIndexBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (PlayerIndexBox != null)
|
||||
{
|
||||
if (PlayerIndexBox.SelectedIndex != (int)ViewModel.PlayerId)
|
||||
{
|
||||
PlayerIndexBox.SelectedIndex = (int)ViewModel.PlayerId;
|
||||
}
|
||||
}
|
||||
|
||||
if (ViewModel.IsModified && !_dialogOpen)
|
||||
{
|
||||
_dialogOpen = true;
|
||||
|
||||
var result = await ContentDialogHelper.CreateConfirmationDialog(
|
||||
var result = await ContentDialogHelper.CreateDeniableConfirmationDialog(
|
||||
LocaleManager.Instance[LocaleKeys.DialogControllerSettingsModifiedConfirmMessage],
|
||||
LocaleManager.Instance[LocaleKeys.DialogControllerSettingsModifiedConfirmSubMessage],
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogYes],
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
||||
LocaleManager.Instance[LocaleKeys.Cancel],
|
||||
LocaleManager.Instance[LocaleKeys.RyujinxConfirm]);
|
||||
|
||||
|
||||
if (result == UserResult.Yes)
|
||||
{
|
||||
ViewModel.Save();
|
||||
@ -43,14 +53,21 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
_dialogOpen = false;
|
||||
|
||||
ViewModel.IsModified = false;
|
||||
|
||||
if (e.AddedItems.Count > 0)
|
||||
if (result == UserResult.Cancel)
|
||||
{
|
||||
var player = (PlayerModel)e.AddedItems[0];
|
||||
ViewModel.PlayerId = player.Id;
|
||||
if (e.AddedItems.Count > 0)
|
||||
{
|
||||
ViewModel.IsModified = true;
|
||||
ViewModel.PlayerId = ((PlayerModel)e.AddedItems[0])!.Id;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
ViewModel.PlayerId = ViewModel.PlayerIdChoose;
|
||||
|
||||
ViewModel.IsModified = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
@ -4,8 +4,10 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
||||
xmlns:uih="clr-namespace:Ryujinx.UI.Common.Helper"
|
||||
mc:Ignorable="d"
|
||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||
xmlns:helper="clr-namespace:Ryujinx.UI.Common.Helper;assembly=Ryujinx.UI.Common"
|
||||
x:DataType="viewModels:MainWindowViewModel"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Main.MainMenuBarView">
|
||||
<Design.DataContext>
|
||||
@ -265,11 +267,11 @@
|
||||
<MenuItem Command="{Binding InstallFirmwareFromFolder}" Header="{ext:Locale MenuBarFileToolsInstallFirmwareFromDirectory}" Icon="{ext:Icon mdi-folder-cog}" />
|
||||
</MenuItem>
|
||||
<MenuItem Header="{ext:Locale MenuBarToolsManageFileTypes}" IsVisible="{Binding ManageFileTypesVisible}">
|
||||
<MenuItem Header="{ext:Locale MenuBarToolsInstallFileTypes}" Click="InstallFileTypes_Click"/>
|
||||
<MenuItem Header="{ext:Locale MenuBarToolsUninstallFileTypes}" Click="UninstallFileTypes_Click"/>
|
||||
<MenuItem Header="{ext:Locale MenuBarToolsInstallFileTypes}" Click="InstallFileTypes_Click" IsEnabled="{Binding AreMimeTypesRegistered, Converter={x:Static BoolConverters.Not}}" />
|
||||
<MenuItem Header="{ext:Locale MenuBarToolsUninstallFileTypes}" Click="UninstallFileTypes_Click" IsEnabled="{Binding AreMimeTypesRegistered}" />
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Header="{ext:Locale MenuBarToolsXCITrimmer}" Click="OpenXCITrimmerWindow" Icon="{ext:Icon fa-solid fa-scissors}" />
|
||||
<MenuItem Header="{ext:Locale MenuBarToolsXCITrimmer}" IsEnabled="{Binding EnableNonGameRunningControls}" Click="OpenXCITrimmerWindow" Icon="{ext:Icon fa-solid fa-scissors}" />
|
||||
</MenuItem>
|
||||
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarView}">
|
||||
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarViewWindow}">
|
||||
|
@ -75,7 +75,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
string parentPath = currentCheatFile.Replace(titleModsPath, string.Empty);
|
||||
|
||||
buildId = Path.GetFileNameWithoutExtension(currentCheatFile).ToUpper();
|
||||
currentGroup = new CheatNode("", buildId, parentPath, true);
|
||||
currentGroup = new CheatNode(string.Empty, buildId, parentPath, true);
|
||||
|
||||
LoadedCheats.Add(currentGroup);
|
||||
}
|
||||
|
@ -32,9 +32,9 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
ContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = "",
|
||||
SecondaryButtonText = "",
|
||||
CloseButtonText = "",
|
||||
PrimaryButtonText = string.Empty,
|
||||
SecondaryButtonText = string.Empty,
|
||||
CloseButtonText = string.Empty,
|
||||
Content = new XCITrimmerWindow(mainWindowViewModel),
|
||||
Title = string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerWindowTitle]),
|
||||
};
|
||||
|
@ -32,7 +32,8 @@ namespace Ryujinx.Ava
|
||||
internal static class Updater
|
||||
{
|
||||
private const string GitHubApiUrl = "https://api.github.com";
|
||||
private const string LatestReleaseUrl = $"{GitHubApiUrl}/repos/{ReleaseInformation.ReleaseChannelOwner}/{ReleaseInformation.ReleaseChannelRepo}/releases/latest";
|
||||
private const string LatestReleaseUrl =
|
||||
$"{GitHubApiUrl}/repos/{ReleaseInformation.ReleaseChannelOwner}/{ReleaseInformation.ReleaseChannelRepo}/releases/latest";
|
||||
|
||||
private static readonly GithubReleasesJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions());
|
||||
|
||||
@ -83,7 +84,7 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
catch
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Application, "Failed to convert the current Ryujinx version!");
|
||||
Logger.Error?.Print(LogClass.Application, $"Failed to convert the current {App.FullAppName} version!");
|
||||
|
||||
await ContentDialogHelper.CreateWarningDialog(
|
||||
LocaleManager.Instance[LocaleKeys.DialogUpdaterConvertFailedMessage],
|
||||
|
Reference in New Issue
Block a user