Compare commits
14 Commits
Canary-1.2
...
Canary-1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13d411e4de | ||
|
|
9f53b07491 | ||
|
|
cd8113dadf | ||
|
|
9089c4ffe5 | ||
|
|
fe9d8d05bd | ||
|
|
880a8ae748 | ||
|
|
11531dacb6 | ||
|
|
3974739ed3 | ||
|
|
440a3447fb | ||
|
|
65374ed6cb | ||
|
|
789d6ab959 | ||
|
|
182db31343 | ||
|
|
ea296b134d | ||
|
|
bf584442b2 |
2
.github/workflows/canary.yml
vendored
2
.github/workflows/canary.yml
vendored
@@ -202,7 +202,7 @@ jobs:
|
|||||||
|
|
||||||
macos_release:
|
macos_release:
|
||||||
name: Release MacOS universal
|
name: Release MacOS universal
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -183,7 +183,7 @@ jobs:
|
|||||||
|
|
||||||
macos_release:
|
macos_release:
|
||||||
name: Release MacOS universal
|
name: Release MacOS universal
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|||||||
@@ -2681,7 +2681,7 @@
|
|||||||
01005EA01C0FC000,"SONIC X SHADOW GENERATIONS",crash,ingame,2025-01-07 04:20:45
|
01005EA01C0FC000,"SONIC X SHADOW GENERATIONS",crash,ingame,2025-01-07 04:20:45
|
||||||
010064F00C212000,"Soul Axiom Rebooted",nvdec;slow,ingame,2020-09-04 12:41:01
|
010064F00C212000,"Soul Axiom Rebooted",nvdec;slow,ingame,2020-09-04 12:41:01
|
||||||
0100F2100F0B2000,"Soul Searching",,playable,2020-07-09 18:39:07
|
0100F2100F0B2000,"Soul Searching",,playable,2020-07-09 18:39:07
|
||||||
01008F2005154000,"South Park™: The Fractured but Whole™ - Standard Edition",slow;online-broken,playable,2024-07-08 17:47:28
|
01008F2005154000,"South Park™: The Fractured but Whole™ - Standard Edition",slow;online-broken;vulkan-backend-bug;gpu,ingame,2025-01-21 17:35:10
|
||||||
0100B9F00C162000,"Space Blaze",,playable,2020-08-30 16:18:05
|
0100B9F00C162000,"Space Blaze",,playable,2020-08-30 16:18:05
|
||||||
010005500E81E000,"Space Cows",UE4;crash,menus,2020-06-15 11:33:20
|
010005500E81E000,"Space Cows",UE4;crash,menus,2020-06-15 11:33:20
|
||||||
0100707011722000,"Space Elite Force",,playable,2020-11-27 15:21:05
|
0100707011722000,"Space Elite Force",,playable,2020-11-27 15:21:05
|
||||||
|
|||||||
|
@@ -14,6 +14,7 @@ namespace Ryujinx.Common
|
|||||||
{
|
{
|
||||||
switch (currentBackend)
|
switch (currentBackend)
|
||||||
{
|
{
|
||||||
|
case GraphicsBackend.Metal when !OperatingSystem.IsMacOS():
|
||||||
case GraphicsBackend.OpenGl when OperatingSystem.IsMacOS():
|
case GraphicsBackend.OpenGl when OperatingSystem.IsMacOS():
|
||||||
return GraphicsBackend.Vulkan;
|
return GraphicsBackend.Vulkan;
|
||||||
case GraphicsBackend.Vulkan or GraphicsBackend.OpenGl or GraphicsBackend.Metal:
|
case GraphicsBackend.Vulkan or GraphicsBackend.OpenGl or GraphicsBackend.Metal:
|
||||||
@@ -34,13 +35,14 @@ namespace Ryujinx.Common
|
|||||||
"01003a30012c0000", // LEGO City Undercover
|
"01003a30012c0000", // LEGO City Undercover
|
||||||
"010028600EBDA000", // Mario 3D World
|
"010028600EBDA000", // Mario 3D World
|
||||||
"0100152000022000", // Mario Kart 8 Deluxe
|
"0100152000022000", // Mario Kart 8 Deluxe
|
||||||
|
"010075a016a3a000", // Persona 4 Arena Ultimax
|
||||||
"0100187003A36000", // Pokémon: Let's Go, Eevee!
|
"0100187003A36000", // Pokémon: Let's Go, Eevee!
|
||||||
"010003f003a34000", // Pokémon: Let's Go, Pikachu!
|
"010003f003a34000", // Pokémon: Let's Go, Pikachu!
|
||||||
"01008C0016544000", // Sea of Stars
|
"01008C0016544000", // Sea of Stars
|
||||||
"01006A800016E000", // Smash Ultimate
|
"01006A800016E000", // Smash Ultimate
|
||||||
"01006bb00c6f0000", // The Legend of Zelda: Link's Awakening
|
"01006bb00c6f0000", // The Legend of Zelda: Link's Awakening
|
||||||
|
|
||||||
//These ones have small issues, but those happen on Vulkan as well:
|
// These ones have small issues, but those happen on Vulkan as well:
|
||||||
"01006f8002326000", // Animal Crossings: New Horizons
|
"01006f8002326000", // Animal Crossings: New Horizons
|
||||||
"01009bf0072d4000", // Captain Toad: Treasure Tracker
|
"01009bf0072d4000", // Captain Toad: Treasure Tracker
|
||||||
"01009510001ca000", // Fast RMX
|
"01009510001ca000", // Fast RMX
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||||||
private static string GetDiskCachePath()
|
private static string GetDiskCachePath()
|
||||||
{
|
{
|
||||||
return GraphicsConfig.EnableShaderCache && GraphicsConfig.TitleId != null
|
return GraphicsConfig.EnableShaderCache && GraphicsConfig.TitleId != null
|
||||||
? Path.Combine(AppDataManager.GamesDirPath, GraphicsConfig.TitleId, "cache", "shader")
|
? Path.Combine(AppDataManager.GamesDirPath, GraphicsConfig.TitleId.ToLower(), "cache", "shader")
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ namespace Ryujinx.Ava
|
|||||||
|
|
||||||
public async Task<bool> LoadGuestApplication(BlitStruct<ApplicationControlProperty>? customNacpData = null)
|
public async Task<bool> LoadGuestApplication(BlitStruct<ApplicationControlProperty>? customNacpData = null)
|
||||||
{
|
{
|
||||||
InitializeSwitchInstance();
|
InitEmulatedSwitch();
|
||||||
MainWindow.UpdateGraphicsConfig();
|
MainWindow.UpdateGraphicsConfig();
|
||||||
|
|
||||||
SystemVersion firmwareVersion = ContentManager.GetCurrentFirmwareVersion();
|
SystemVersion firmwareVersion = ContentManager.GetCurrentFirmwareVersion();
|
||||||
@@ -758,6 +758,8 @@ namespace Ryujinx.Ava
|
|||||||
romFsFiles = Directory.GetFiles(ApplicationPath, "*.romfs");
|
romFsFiles = Directory.GetFiles(ApplicationPath, "*.romfs");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.Notice.Print(LogClass.Application, $"Loading unpacked content archive from '{ApplicationPath}'.");
|
||||||
|
|
||||||
if (romFsFiles.Length > 0)
|
if (romFsFiles.Length > 0)
|
||||||
{
|
{
|
||||||
Logger.Info?.Print(LogClass.Application, "Loading as cart with RomFS.");
|
Logger.Info?.Print(LogClass.Application, "Loading as cart with RomFS.");
|
||||||
@@ -783,6 +785,8 @@ namespace Ryujinx.Ava
|
|||||||
}
|
}
|
||||||
else if (File.Exists(ApplicationPath))
|
else if (File.Exists(ApplicationPath))
|
||||||
{
|
{
|
||||||
|
Logger.Notice.Print(LogClass.Application, $"Loading content archive from '{ApplicationPath}'.");
|
||||||
|
|
||||||
switch (Path.GetExtension(ApplicationPath).ToLowerInvariant())
|
switch (Path.GetExtension(ApplicationPath).ToLowerInvariant())
|
||||||
{
|
{
|
||||||
case ".xci":
|
case ".xci":
|
||||||
@@ -885,7 +889,7 @@ namespace Ryujinx.Ava
|
|||||||
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
|
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeSwitchInstance()
|
private void InitEmulatedSwitch()
|
||||||
{
|
{
|
||||||
// Initialize KeySet.
|
// Initialize KeySet.
|
||||||
VirtualFileSystem.ReloadKeySet();
|
VirtualFileSystem.ReloadKeySet();
|
||||||
@@ -1040,7 +1044,7 @@ namespace Ryujinx.Ava
|
|||||||
_viewModel.WindowState = WindowState.FullScreen;
|
_viewModel.WindowState = WindowState.FullScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_viewModel.WindowState is WindowState.FullScreen)
|
if (_viewModel.WindowState is WindowState.FullScreen || _viewModel.StartGamesWithoutUI)
|
||||||
{
|
{
|
||||||
_viewModel.ShowMenuAndStatusBar = false;
|
_viewModel.ShowMenuAndStatusBar = false;
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/Ryujinx/Assets/Styles/CheckboxMenuItemStyle.axaml
Normal file
13
src/Ryujinx/Assets/Styles/CheckboxMenuItemStyle.axaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<Styles xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<Style Selector="MenuItem.withCheckbox Viewbox#PART_IconPresenter">
|
||||||
|
<Setter Property="MaxHeight" Value="36" />
|
||||||
|
<Setter Property="MinHeight" Value="36" />
|
||||||
|
<Setter Property="MaxWidth" Value="36" />
|
||||||
|
<Setter Property="MinWidth" Value="36" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="MenuItem.withCheckbox ContentPresenter#PART_HeaderPresenter">
|
||||||
|
<Setter Property="Padding" Value="-10,0,0,0" />
|
||||||
|
</Style>
|
||||||
|
</Styles>
|
||||||
|
|
||||||
@@ -572,6 +572,31 @@
|
|||||||
"zh_TW": "使用全螢幕模式啟動遊戲"
|
"zh_TW": "使用全螢幕模式啟動遊戲"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "MenuBarOptionsStartGamesWithoutUI",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "Start Games with UI Hidden",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "MenuBarOptionsStopEmulation",
|
"ID": "MenuBarOptionsStopEmulation",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Avalonia.Controls.Notifications;
|
|
||||||
using Avalonia.Platform.Storage;
|
using Avalonia.Platform.Storage;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
|
using Gommon;
|
||||||
using LibHac;
|
using LibHac;
|
||||||
using LibHac.Account;
|
using LibHac.Account;
|
||||||
using LibHac.Common;
|
using LibHac.Common;
|
||||||
@@ -15,6 +15,7 @@ using LibHac.Tools.FsSystem.NcaUtils;
|
|||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Controls;
|
using Ryujinx.Ava.UI.Controls;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
|
using Ryujinx.Ava.Utilities;
|
||||||
using Ryujinx.Ava.Utilities.Configuration;
|
using Ryujinx.Ava.Utilities.Configuration;
|
||||||
using Ryujinx.Common.Helper;
|
using Ryujinx.Common.Helper;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
@@ -418,35 +419,27 @@ namespace Ryujinx.Ava.Common
|
|||||||
|
|
||||||
public static async Task ExtractAoc(IStorageProvider storageProvider, string updateFilePath, string updateName)
|
public static async Task ExtractAoc(IStorageProvider storageProvider, string updateFilePath, string updateName)
|
||||||
{
|
{
|
||||||
var result = await storageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
Optional<IStorageFolder> result = await storageProvider.OpenSingleFolderPickerAsync(new FolderPickerOpenOptions
|
||||||
{
|
{
|
||||||
Title = LocaleManager.Instance[LocaleKeys.FolderDialogExtractTitle],
|
Title = LocaleManager.Instance[LocaleKeys.FolderDialogExtractTitle]
|
||||||
AllowMultiple = false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result.Count == 0)
|
if (!result.HasValue) return;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtractAoc(result[0].Path.LocalPath, updateFilePath, updateName);
|
ExtractAoc(result.Value.Path.LocalPath, updateFilePath, updateName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static async Task ExtractSection(IStorageProvider storageProvider, NcaSectionType ncaSectionType, string titleFilePath, string titleName, int programIndex = 0)
|
public static async Task ExtractSection(IStorageProvider storageProvider, NcaSectionType ncaSectionType, string titleFilePath, string titleName, int programIndex = 0)
|
||||||
{
|
{
|
||||||
var result = await storageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
Optional<IStorageFolder> result = await storageProvider.OpenSingleFolderPickerAsync(new FolderPickerOpenOptions
|
||||||
{
|
{
|
||||||
Title = LocaleManager.Instance[LocaleKeys.FolderDialogExtractTitle],
|
Title = LocaleManager.Instance[LocaleKeys.FolderDialogExtractTitle]
|
||||||
AllowMultiple = false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result.Count == 0)
|
if (!result.HasValue) return;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtractSection(result[0].Path.LocalPath, ncaSectionType, titleFilePath, titleName, programIndex);
|
ExtractSection(result.Value.Path.LocalPath, ncaSectionType, titleFilePath, titleName, programIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static (Result? result, bool canceled) CopyDirectory(FileSystemClient fs, string sourcePath, string destPath, CancellationToken token)
|
public static (Result? result, bool canceled) CopyDirectory(FileSystemClient fs, string sourcePath, string destPath, CancellationToken token)
|
||||||
|
|||||||
@@ -233,11 +233,13 @@ namespace Ryujinx.Ava
|
|||||||
Logger.Notice.Print(LogClass.Application, $".NET Runtime: {RuntimeInformation.FrameworkDescription}");
|
Logger.Notice.Print(LogClass.Application, $".NET Runtime: {RuntimeInformation.FrameworkDescription}");
|
||||||
SystemInfo.Gather().Print();
|
SystemInfo.Gather().Print();
|
||||||
|
|
||||||
var enabledLogLevels = Logger.GetEnabledLevels().ToArray();
|
Logger.Notice.Print(LogClass.Application, $"Logs Enabled: {
|
||||||
|
Logger.GetEnabledLevels()
|
||||||
Logger.Notice.Print(LogClass.Application, $"Logs Enabled: {(enabledLogLevels.Length is 0
|
.FormatCollection(
|
||||||
? "<None>"
|
x => x.ToString(),
|
||||||
: enabledLogLevels.JoinToString(", "))}");
|
separator: ", ",
|
||||||
|
emptyCollectionFallback: "<None>")
|
||||||
|
}");
|
||||||
|
|
||||||
Logger.Notice.Print(LogClass.Application,
|
Logger.Notice.Print(LogClass.Application,
|
||||||
AppDataManager.Mode == AppDataManager.LaunchMode.Custom
|
AppDataManager.Mode == AppDataManager.LaunchMode.Custom
|
||||||
|
|||||||
@@ -123,12 +123,13 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</AvaloniaResource>
|
</AvaloniaResource>
|
||||||
<AvaloniaResource Include="Assets\Styles\Styles.xaml" />
|
<AvaloniaResource Include="Assets\Styles\Styles.xaml" />
|
||||||
|
<AvaloniaResource Include="Assets\Styles\CheckboxMenuItemStyle.axaml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Assets\locales.json" />
|
<None Remove="Assets\locales.json" />
|
||||||
<None Remove="Assets\Styles\Styles.xaml" />
|
|
||||||
<None Remove="Assets\Styles\Themes.xaml" />
|
<None Remove="Assets\Styles\Themes.xaml" />
|
||||||
|
<None Remove="Assets\Styles\CheckboxMenuItemStyle.xaml" />
|
||||||
<None Remove="Assets\Icons\Controller_JoyConLeft.svg" />
|
<None Remove="Assets\Icons\Controller_JoyConLeft.svg" />
|
||||||
<None Remove="Assets\Icons\Controller_JoyConPair.svg" />
|
<None Remove="Assets\Icons\Controller_JoyConPair.svg" />
|
||||||
<None Remove="Assets\Icons\Controller_JoyConRight.svg" />
|
<None Remove="Assets\Icons\Controller_JoyConRight.svg" />
|
||||||
@@ -150,6 +151,7 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Assets\locales.json" />
|
<EmbeddedResource Include="Assets\locales.json" />
|
||||||
<EmbeddedResource Include="Assets\Styles\Styles.xaml" />
|
<EmbeddedResource Include="Assets\Styles\Styles.xaml" />
|
||||||
|
<EmbeddedResource Include="Assets\Styles\CheckboxMenuItemStyle.axaml" />
|
||||||
<EmbeddedResource Include="Assets\Icons\Controller_JoyConLeft.svg" />
|
<EmbeddedResource Include="Assets\Icons\Controller_JoyConLeft.svg" />
|
||||||
<EmbeddedResource Include="Assets\Icons\Controller_JoyConPair.svg" />
|
<EmbeddedResource Include="Assets\Icons\Controller_JoyConPair.svg" />
|
||||||
<EmbeddedResource Include="Assets\Icons\Controller_JoyConRight.svg" />
|
<EmbeddedResource Include="Assets\Icons\Controller_JoyConRight.svg" />
|
||||||
|
|||||||
@@ -16,5 +16,6 @@
|
|||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<sty:FluentAvaloniaTheme PreferUserAccentColor="True" PreferSystemTheme="False" />
|
<sty:FluentAvaloniaTheme PreferUserAccentColor="True" PreferSystemTheme="False" />
|
||||||
<StyleInclude Source="/Assets/Styles/Styles.xaml" />
|
<StyleInclude Source="/Assets/Styles/Styles.xaml" />
|
||||||
|
<StyleInclude Source="/Assets/Styles/CheckboxMenuItemStyle.axaml"/>
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ namespace Ryujinx.Ava.UI.Controls
|
|||||||
{
|
{
|
||||||
if (sender is MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
if (sender is MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
||||||
{
|
{
|
||||||
string shaderCacheDir = Path.Combine(AppDataManager.GamesDirPath, viewModel.SelectedApplication.IdString, "cache", "shader");
|
string shaderCacheDir = Path.Combine(AppDataManager.GamesDirPath, viewModel.SelectedApplication.IdString.ToLower(), "cache", "shader");
|
||||||
|
|
||||||
if (!Directory.Exists(shaderCacheDir))
|
if (!Directory.Exists(shaderCacheDir))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -488,6 +488,19 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool StartGamesWithoutUI
|
||||||
|
{
|
||||||
|
get => ConfigurationState.Instance.UI.StartNoUI;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ConfigurationState.Instance.UI.StartNoUI.Value = value;
|
||||||
|
|
||||||
|
ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
||||||
|
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool ShowConsole
|
public bool ShowConsole
|
||||||
{
|
{
|
||||||
get => ConfigurationState.Instance.UI.ShowConsole;
|
get => ConfigurationState.Instance.UI.ShowConsole;
|
||||||
@@ -1198,6 +1211,11 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
StartGamesInFullscreen = !StartGamesInFullscreen;
|
StartGamesInFullscreen = !StartGamesInFullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ToggleStartGamesWithoutUI()
|
||||||
|
{
|
||||||
|
StartGamesWithoutUI = !StartGamesWithoutUI;
|
||||||
|
}
|
||||||
|
|
||||||
public void ToggleShowConsole()
|
public void ToggleShowConsole()
|
||||||
{
|
{
|
||||||
ShowConsole = !ShowConsole;
|
ShowConsole = !ShowConsole;
|
||||||
@@ -1644,10 +1662,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
|
|
||||||
public async Task OpenAmiiboWindow()
|
public async Task OpenAmiiboWindow()
|
||||||
{
|
{
|
||||||
if (!IsAmiiboRequested)
|
if (AppHost.Device.System.SearchingForAmiibo(out int deviceId) && IsGameRunning)
|
||||||
return;
|
|
||||||
|
|
||||||
if (AppHost.Device.System.SearchingForAmiibo(out int deviceId))
|
|
||||||
{
|
{
|
||||||
string titleId = AppHost.Device.Processes.ActiveApplication.ProgramIdText.ToUpper();
|
string titleId = AppHost.Device.Processes.ActiveApplication.ProgramIdText.ToUpper();
|
||||||
AmiiboWindow window = new(ShowAll, LastScannedAmiiboId, titleId);
|
AmiiboWindow window = new(ShowAll, LastScannedAmiiboId, titleId);
|
||||||
@@ -1665,10 +1680,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
}
|
}
|
||||||
public async Task OpenBinFile()
|
public async Task OpenBinFile()
|
||||||
{
|
{
|
||||||
if (!IsAmiiboRequested)
|
if (AppHost.Device.System.SearchingForAmiibo(out _) && IsGameRunning)
|
||||||
return;
|
|
||||||
|
|
||||||
if (AppHost.Device.System.SearchingForAmiibo(out int deviceId))
|
|
||||||
{
|
{
|
||||||
var result = await StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
var result = await StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,25 +81,16 @@
|
|||||||
<MenuItem
|
<MenuItem
|
||||||
Command="{Binding ToggleFullscreen}"
|
Command="{Binding ToggleFullscreen}"
|
||||||
Header="{ext:Locale MenuBarOptionsToggleFullscreen}"
|
Header="{ext:Locale MenuBarOptionsToggleFullscreen}"
|
||||||
|
Classes="withCheckbox"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
Icon="{ext:Icon fa-solid fa-expand}"
|
Icon="{ext:Icon fa-solid fa-expand}"
|
||||||
InputGesture="F11">
|
InputGesture="F11">
|
||||||
<MenuItem.Styles>
|
|
||||||
<Style Selector="Viewbox#PART_IconPresenter">
|
|
||||||
<Setter Property="MaxHeight" Value="36" />
|
|
||||||
<Setter Property="MinHeight" Value="36" />
|
|
||||||
<Setter Property="MaxWidth" Value="36" />
|
|
||||||
<Setter Property="MinWidth" Value="36" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="ContentPresenter#PART_HeaderPresenter">
|
|
||||||
<Setter Property="Padding" Value="-10,0,0,0" />
|
|
||||||
</Style>
|
|
||||||
</MenuItem.Styles>
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Padding="0"
|
Padding="0"
|
||||||
Command="{Binding ToggleStartGamesInFullscreen}"
|
Command="{Binding ToggleStartGamesInFullscreen}"
|
||||||
Header="{ext:Locale MenuBarOptionsStartGamesInFullscreen}">
|
Header="{ext:Locale MenuBarOptionsStartGamesInFullscreen}"
|
||||||
|
Classes="withCheckbox">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
MinWidth="{DynamicResource CheckBoxSize}"
|
MinWidth="{DynamicResource CheckBoxSize}"
|
||||||
@@ -107,23 +98,26 @@
|
|||||||
IsChecked="{Binding StartGamesInFullscreen, Mode=TwoWay}"
|
IsChecked="{Binding StartGamesInFullscreen, Mode=TwoWay}"
|
||||||
Padding="0" />
|
Padding="0" />
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
<MenuItem.Styles>
|
</MenuItem>
|
||||||
<Style Selector="Viewbox#PART_IconPresenter">
|
<MenuItem
|
||||||
<Setter Property="MaxHeight" Value="36" />
|
Padding="0"
|
||||||
<Setter Property="MinHeight" Value="36" />
|
Command="{Binding ToggleStartGamesWithoutUI}"
|
||||||
<Setter Property="MaxWidth" Value="36" />
|
Header="{ext:Locale MenuBarOptionsStartGamesWithoutUI}"
|
||||||
<Setter Property="MinWidth" Value="36" />
|
Classes="withCheckbox">
|
||||||
</Style>
|
<MenuItem.Icon>
|
||||||
<Style Selector="ContentPresenter#PART_HeaderPresenter">
|
<CheckBox
|
||||||
<Setter Property="Padding" Value="-10,0,0,0" />
|
MinWidth="{DynamicResource CheckBoxSize}"
|
||||||
</Style>
|
MinHeight="{DynamicResource CheckBoxSize}"
|
||||||
</MenuItem.Styles>
|
IsChecked="{Binding StartGamesWithoutUI, Mode=TwoWay}"
|
||||||
|
Padding="0" />
|
||||||
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Padding="0"
|
Padding="0"
|
||||||
IsVisible="{Binding ShowConsoleVisible}"
|
IsVisible="{Binding ShowConsoleVisible}"
|
||||||
Command="{Binding ToggleShowConsole}"
|
Command="{Binding ToggleShowConsole}"
|
||||||
Header="{ext:Locale MenuBarOptionsShowConsole}">
|
Header="{ext:Locale MenuBarOptionsShowConsole}"
|
||||||
|
Classes="withCheckbox">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
MinWidth="{DynamicResource CheckBoxSize}"
|
MinWidth="{DynamicResource CheckBoxSize}"
|
||||||
@@ -131,35 +125,14 @@
|
|||||||
IsChecked="{Binding ShowConsole, Mode=TwoWay}"
|
IsChecked="{Binding ShowConsole, Mode=TwoWay}"
|
||||||
Padding="0" />
|
Padding="0" />
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
<MenuItem.Styles>
|
|
||||||
<Style Selector="Viewbox#PART_IconPresenter">
|
|
||||||
<Setter Property="MaxHeight" Value="36" />
|
|
||||||
<Setter Property="MinHeight" Value="36" />
|
|
||||||
<Setter Property="MaxWidth" Value="36" />
|
|
||||||
<Setter Property="MinWidth" Value="36" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="ContentPresenter#PART_HeaderPresenter">
|
|
||||||
<Setter Property="Padding" Value="-10,0,0,0" />
|
|
||||||
</Style>
|
|
||||||
</MenuItem.Styles>
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Name="ChangeLanguageMenuItem"
|
Name="ChangeLanguageMenuItem"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
Header="{ext:Locale MenuBarOptionsChangeLanguage}"
|
Header="{ext:Locale MenuBarOptionsChangeLanguage}"
|
||||||
Icon="{ext:Icon fa-solid fa-language}">
|
Icon="{ext:Icon fa-solid fa-language}"
|
||||||
<MenuItem.Styles>
|
Classes="withCheckbox">
|
||||||
<Style Selector="Viewbox#PART_IconPresenter">
|
|
||||||
<Setter Property="MaxHeight" Value="36" />
|
|
||||||
<Setter Property="MinHeight" Value="36" />
|
|
||||||
<Setter Property="MaxWidth" Value="36" />
|
|
||||||
<Setter Property="MinWidth" Value="36" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="ContentPresenter#PART_HeaderPresenter">
|
|
||||||
<Setter Property="Padding" Value="-10,0,0,0" />
|
|
||||||
</Style>
|
|
||||||
</MenuItem.Styles>
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Name="ToggleFileTypesMenuItem"
|
Name="ToggleFileTypesMenuItem"
|
||||||
@@ -171,18 +144,8 @@
|
|||||||
Padding="0"
|
Padding="0"
|
||||||
Header="{ext:Locale MenuBarOptionsSettings}"
|
Header="{ext:Locale MenuBarOptionsSettings}"
|
||||||
Icon="{ext:Icon fa-solid fa-gear}"
|
Icon="{ext:Icon fa-solid fa-gear}"
|
||||||
ToolTip.Tip="{ext:Locale OpenSettingsTooltip}">
|
ToolTip.Tip="{ext:Locale OpenSettingsTooltip}"
|
||||||
<MenuItem.Styles>
|
Classes="withCheckbox">
|
||||||
<Style Selector="Viewbox#PART_IconPresenter">
|
|
||||||
<Setter Property="MaxHeight" Value="36" />
|
|
||||||
<Setter Property="MinHeight" Value="36" />
|
|
||||||
<Setter Property="MaxWidth" Value="36" />
|
|
||||||
<Setter Property="MinWidth" Value="36" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="ContentPresenter#PART_HeaderPresenter">
|
|
||||||
<Setter Property="Padding" Value="-10,0,0,0" />
|
|
||||||
</Style>
|
|
||||||
</MenuItem.Styles>
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Command="{Binding ManageProfiles}"
|
Command="{Binding ManageProfiles}"
|
||||||
@@ -190,18 +153,8 @@
|
|||||||
Header="{ext:Locale MenuBarOptionsManageUserProfiles}"
|
Header="{ext:Locale MenuBarOptionsManageUserProfiles}"
|
||||||
Icon="{ext:Icon mdi-account}"
|
Icon="{ext:Icon mdi-account}"
|
||||||
IsEnabled="{Binding EnableNonGameRunningControls}"
|
IsEnabled="{Binding EnableNonGameRunningControls}"
|
||||||
ToolTip.Tip="{ext:Locale OpenProfileManagerTooltip}">
|
ToolTip.Tip="{ext:Locale OpenProfileManagerTooltip}"
|
||||||
<MenuItem.Styles>
|
Classes="withCheckbox">
|
||||||
<Style Selector="Viewbox#PART_IconPresenter">
|
|
||||||
<Setter Property="MaxHeight" Value="36" />
|
|
||||||
<Setter Property="MinHeight" Value="36" />
|
|
||||||
<Setter Property="MaxWidth" Value="36" />
|
|
||||||
<Setter Property="MinWidth" Value="36" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="ContentPresenter#PART_HeaderPresenter">
|
|
||||||
<Setter Property="Padding" Value="-10,0,0,0" />
|
|
||||||
</Style>
|
|
||||||
</MenuItem.Styles>
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<TextBlock
|
<TextBlock
|
||||||
Foreground="{DynamicResource SecondaryTextColor}"
|
Foreground="{DynamicResource SecondaryTextColor}"
|
||||||
TextDecorations="Underline"
|
TextDecorations="Underline"
|
||||||
Text="Game-specific hacks & tricks to alleviate performance issues or crashing. Will cause issues." />
|
Text="Highly specific hacks & tricks to alleviate performance issues, crashing, or freezing. Will cause issues." />
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="0,10,0,0"
|
Margin="0,10,0,0"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
|
|||||||
@@ -114,8 +114,7 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
MinWidth="90"
|
MinWidth="90"
|
||||||
Margin="10,0,0,0"
|
Margin="10,0,0,0"
|
||||||
ToolTip.Tip="{ext:Locale AddGameDirTooltip}"
|
ToolTip.Tip="{ext:Locale AddGameDirTooltip}">
|
||||||
Click="AddGameDirButton_OnClick">
|
|
||||||
<TextBlock HorizontalAlignment="Center"
|
<TextBlock HorizontalAlignment="Center"
|
||||||
Text="{ext:Locale SettingsTabGeneralAdd}" />
|
Text="{ext:Locale SettingsTabGeneralAdd}" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -168,8 +167,7 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
MinWidth="90"
|
MinWidth="90"
|
||||||
Margin="10,0,0,0"
|
Margin="10,0,0,0"
|
||||||
ToolTip.Tip="{ext:Locale AddAutoloadDirTooltip}"
|
ToolTip.Tip="{ext:Locale AddAutoloadDirTooltip}">
|
||||||
Click="AddAutoloadDirButton_OnClick">
|
|
||||||
<TextBlock HorizontalAlignment="Center"
|
<TextBlock HorizontalAlignment="Center"
|
||||||
Text="{ext:Locale SettingsTabGeneralAdd}" />
|
Text="{ext:Locale SettingsTabGeneralAdd}" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
|
using Avalonia.Collections;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Platform.Storage;
|
using Avalonia.Platform.Storage;
|
||||||
using Avalonia.VisualTree;
|
using Avalonia.VisualTree;
|
||||||
|
using Gommon;
|
||||||
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
|
using Ryujinx.Ava.Utilities;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Views.Settings
|
namespace Ryujinx.Ava.UI.Views.Settings
|
||||||
{
|
{
|
||||||
@@ -18,31 +23,39 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ShowTitleBarBox.IsVisible = OperatingSystem.IsWindows();
|
ShowTitleBarBox.IsVisible = OperatingSystem.IsWindows();
|
||||||
|
AddGameDirButton.Command =
|
||||||
|
Commands.Create(() => AddDirButton(GameDirPathBox, ViewModel.GameDirectories, true));
|
||||||
|
AddAutoloadDirButton.Command =
|
||||||
|
Commands.Create(() => AddDirButton(AutoloadDirPathBox, ViewModel.AutoloadDirectories, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void AddGameDirButton_OnClick(object sender, RoutedEventArgs e)
|
private async Task AddDirButton(TextBox addDirBox, AvaloniaList<string> directories, bool isGameList)
|
||||||
{
|
{
|
||||||
string path = GameDirPathBox.Text;
|
string path = addDirBox.Text;
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(path) && Directory.Exists(path) && !ViewModel.GameDirectories.Contains(path))
|
if (!string.IsNullOrWhiteSpace(path) && Directory.Exists(path) && !directories.Contains(path))
|
||||||
{
|
{
|
||||||
ViewModel.GameDirectories.Add(path);
|
directories.Add(path);
|
||||||
ViewModel.GameDirectoryChanged = true;
|
|
||||||
|
addDirBox.Clear();
|
||||||
|
|
||||||
|
if (isGameList)
|
||||||
|
ViewModel.GameDirectoryChanged = true;
|
||||||
|
else
|
||||||
|
ViewModel.AutoloadDirectoryChanged = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this.GetVisualRoot() is Window window)
|
Optional<IStorageFolder> folder = await RyujinxApp.MainWindow.ViewModel.StorageProvider.OpenSingleFolderPickerAsync();
|
||||||
{
|
|
||||||
var result = await window.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
|
||||||
{
|
|
||||||
AllowMultiple = false,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (result.Count > 0)
|
if (folder.HasValue)
|
||||||
{
|
{
|
||||||
ViewModel.GameDirectories.Add(result[0].Path.LocalPath);
|
directories.Add(folder.Value.Path.LocalPath);
|
||||||
|
|
||||||
|
if (isGameList)
|
||||||
ViewModel.GameDirectoryChanged = true;
|
ViewModel.GameDirectoryChanged = true;
|
||||||
}
|
else
|
||||||
|
ViewModel.AutoloadDirectoryChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,33 +76,6 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void AddAutoloadDirButton_OnClick(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
string path = AutoloadDirPathBox.Text;
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(path) && Directory.Exists(path) && !ViewModel.AutoloadDirectories.Contains(path))
|
|
||||||
{
|
|
||||||
ViewModel.AutoloadDirectories.Add(path);
|
|
||||||
ViewModel.AutoloadDirectoryChanged = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (this.GetVisualRoot() is Window window)
|
|
||||||
{
|
|
||||||
var result = await window.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
|
||||||
{
|
|
||||||
AllowMultiple = false,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (result.Count > 0)
|
|
||||||
{
|
|
||||||
ViewModel.AutoloadDirectories.Add(result[0].Path.LocalPath);
|
|
||||||
ViewModel.AutoloadDirectoryChanged = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RemoveAutoloadDirButton_OnClick(object sender, RoutedEventArgs e)
|
private void RemoveAutoloadDirButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
int oldIndex = AutoloadDirsList.SelectedIndex;
|
int oldIndex = AutoloadDirsList.SelectedIndex;
|
||||||
|
|||||||
@@ -691,6 +691,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
ApplicationLibrary.LoadApplications(ConfigurationState.Instance.UI.GameDirs);
|
ApplicationLibrary.LoadApplications(ConfigurationState.Instance.UI.GameDirs);
|
||||||
|
|
||||||
var autoloadDirs = ConfigurationState.Instance.UI.AutoloadDirs.Value;
|
var autoloadDirs = ConfigurationState.Instance.UI.AutoloadDirs.Value;
|
||||||
|
autoloadDirs.ForEach(dir => Logger.Info?.Print(LogClass.Application, $"Auto loading DLC & updates from: {dir}"));
|
||||||
if (autoloadDirs.Count > 0)
|
if (autoloadDirs.Count > 0)
|
||||||
{
|
{
|
||||||
var updatesLoaded = ApplicationLibrary.AutoLoadTitleUpdates(autoloadDirs, out int updatesRemoved);
|
var updatesLoaded = ApplicationLibrary.AutoLoadTitleUpdates(autoloadDirs, out int updatesRemoved);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
SecondaryButtonText = string.Empty,
|
SecondaryButtonText = string.Empty,
|
||||||
CloseButtonText = string.Empty,
|
CloseButtonText = string.Empty,
|
||||||
Content = new XCITrimmerWindow(RyujinxApp.MainWindow.ViewModel),
|
Content = new XCITrimmerWindow(RyujinxApp.MainWindow.ViewModel),
|
||||||
Title = string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerWindowTitle]),
|
Title = LocaleManager.Instance[LocaleKeys.XCITrimmerWindowTitle]
|
||||||
};
|
};
|
||||||
|
|
||||||
Style bottomBorder = new(x => x.OfType<Grid>().Name("DialogSpace").Child().OfType<Border>());
|
Style bottomBorder = new(x => x.OfType<Grid>().Name("DialogSpace").Child().OfType<Border>());
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ namespace Ryujinx.Ava
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.Info?.Print(LogClass.Application, "Checking for updates.");
|
||||||
|
|
||||||
// Get latest version number from GitHub API
|
// Get latest version number from GitHub API
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -141,6 +143,8 @@ namespace Ryujinx.Ava
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.Info?.Print(LogClass.Application, "Up to date.");
|
||||||
|
|
||||||
_running = false;
|
_running = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -214,6 +218,8 @@ namespace Ryujinx.Ava
|
|||||||
? $"Canary {currentVersion} -> Canary {newVersion}"
|
? $"Canary {currentVersion} -> Canary {newVersion}"
|
||||||
: $"{currentVersion} -> {newVersion}";
|
: $"{currentVersion} -> {newVersion}";
|
||||||
|
|
||||||
|
Logger.Info?.Print(LogClass.Application, $"Version found: {newVersionString}");
|
||||||
|
|
||||||
RequestUserToUpdate:
|
RequestUserToUpdate:
|
||||||
// Show a message asking the user if they want to update
|
// Show a message asking the user if they want to update
|
||||||
UserResult shouldUpdate = await ContentDialogHelper.CreateUpdaterChoiceDialog(
|
UserResult shouldUpdate = await ContentDialogHelper.CreateUpdaterChoiceDialog(
|
||||||
|
|||||||
@@ -840,7 +840,6 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Remove any downloadable content which can no longer be located on disk
|
// 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
|
var dlcToRemove = _downloadableContents.Items
|
||||||
.Where(dlc => !File.Exists(dlc.Dlc.ContainerPath))
|
.Where(dlc => !File.Exists(dlc.Dlc.ContainerPath))
|
||||||
.ToList();
|
.ToList();
|
||||||
@@ -852,8 +851,6 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
|||||||
|
|
||||||
foreach (string appDir in appDirs)
|
foreach (string appDir in appDirs)
|
||||||
{
|
{
|
||||||
Logger.Notice.Print(LogClass.Application, $"Auto loading DLC from: {appDir}");
|
|
||||||
|
|
||||||
if (_cancellationToken.Token.IsCancellationRequested)
|
if (_cancellationToken.Token.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
return newDlcLoaded;
|
return newDlcLoaded;
|
||||||
@@ -956,7 +953,6 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
|||||||
var titleIdsToRefresh = new HashSet<ulong>();
|
var titleIdsToRefresh = new HashSet<ulong>();
|
||||||
|
|
||||||
// Remove any updates which can no longer be located on disk
|
// 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
|
var updatesToRemove = _titleUpdates.Items
|
||||||
.Where(it => !File.Exists(it.TitleUpdate.Path))
|
.Where(it => !File.Exists(it.TitleUpdate.Path))
|
||||||
.ToList();
|
.ToList();
|
||||||
@@ -971,8 +967,6 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
|||||||
|
|
||||||
foreach (string appDir in appDirs)
|
foreach (string appDir in appDirs)
|
||||||
{
|
{
|
||||||
Logger.Notice.Print(LogClass.Application, $"Auto loading updates from: {appDir}");
|
|
||||||
|
|
||||||
if (_cancellationToken.Token.IsCancellationRequested)
|
if (_cancellationToken.Token.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
return numUpdatesLoaded;
|
return numUpdatesLoaded;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current version of the file format
|
/// The current version of the file format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int CurrentVersion = 59;
|
public const int CurrentVersion = 60;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the configuration file format
|
/// Version of the configuration file format
|
||||||
@@ -351,6 +351,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool StartFullscreen { get; set; }
|
public bool StartFullscreen { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Start games with UI hidden
|
||||||
|
/// </summary>
|
||||||
|
public bool StartNoUI { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show console window
|
/// Show console window
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
UI.GridSize.Value = cff.GridSize;
|
UI.GridSize.Value = cff.GridSize;
|
||||||
UI.ApplicationSort.Value = cff.ApplicationSort;
|
UI.ApplicationSort.Value = cff.ApplicationSort;
|
||||||
UI.StartFullscreen.Value = cff.StartFullscreen;
|
UI.StartFullscreen.Value = cff.StartFullscreen;
|
||||||
|
UI.StartNoUI.Value = cff.StartNoUI;
|
||||||
UI.ShowConsole.Value = cff.ShowConsole;
|
UI.ShowConsole.Value = cff.ShowConsole;
|
||||||
UI.WindowStartup.WindowSizeWidth.Value = cff.WindowStartup.WindowSizeWidth;
|
UI.WindowStartup.WindowSizeWidth.Value = cff.WindowStartup.WindowSizeWidth;
|
||||||
UI.WindowStartup.WindowSizeHeight.Value = cff.WindowStartup.WindowSizeHeight;
|
UI.WindowStartup.WindowSizeHeight.Value = cff.WindowStartup.WindowSizeHeight;
|
||||||
@@ -414,7 +415,8 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
// This was accidentally enabled by default when it was PRed. That is not what we want,
|
// This was accidentally enabled by default when it was PRed. That is not what we want,
|
||||||
// so as a compromise users who want to use it will simply need to re-enable it once after updating.
|
// so as a compromise users who want to use it will simply need to re-enable it once after updating.
|
||||||
cff.IgnoreApplet = false;
|
cff.IgnoreApplet = false;
|
||||||
})
|
}),
|
||||||
|
(60, static cff => cff.StartNoUI = false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,6 +152,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ReactiveObject<bool> StartFullscreen { get; private set; }
|
public ReactiveObject<bool> StartFullscreen { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Start games with UI hidden
|
||||||
|
/// </summary>
|
||||||
|
public ReactiveObject<bool> StartNoUI { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hide / Show Console Window
|
/// Hide / Show Console Window
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -192,6 +197,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
WindowStartup = new WindowStartupSettings();
|
WindowStartup = new WindowStartupSettings();
|
||||||
BaseStyle = new ReactiveObject<string>();
|
BaseStyle = new ReactiveObject<string>();
|
||||||
StartFullscreen = new ReactiveObject<bool>();
|
StartFullscreen = new ReactiveObject<bool>();
|
||||||
|
StartNoUI = new ReactiveObject<bool>();
|
||||||
GameListViewMode = new ReactiveObject<int>();
|
GameListViewMode = new ReactiveObject<int>();
|
||||||
ShowNames = new ReactiveObject<bool>();
|
ShowNames = new ReactiveObject<bool>();
|
||||||
GridSize = new ReactiveObject<int>();
|
GridSize = new ReactiveObject<int>();
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
ApplicationSort = UI.ApplicationSort,
|
ApplicationSort = UI.ApplicationSort,
|
||||||
IsAscendingOrder = UI.IsAscendingOrder,
|
IsAscendingOrder = UI.IsAscendingOrder,
|
||||||
StartFullscreen = UI.StartFullscreen,
|
StartFullscreen = UI.StartFullscreen,
|
||||||
|
StartNoUI = UI.StartNoUI,
|
||||||
ShowConsole = UI.ShowConsole,
|
ShowConsole = UI.ShowConsole,
|
||||||
EnableKeyboard = Hid.EnableKeyboard,
|
EnableKeyboard = Hid.EnableKeyboard,
|
||||||
EnableMouse = Hid.EnableMouse,
|
EnableMouse = Hid.EnableMouse,
|
||||||
@@ -233,6 +234,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
UI.ApplicationSort.Value = 0;
|
UI.ApplicationSort.Value = 0;
|
||||||
UI.IsAscendingOrder.Value = true;
|
UI.IsAscendingOrder.Value = true;
|
||||||
UI.StartFullscreen.Value = false;
|
UI.StartFullscreen.Value = false;
|
||||||
|
UI.StartNoUI.Value = false;
|
||||||
UI.ShowConsole.Value = true;
|
UI.ShowConsole.Value = true;
|
||||||
UI.WindowStartup.WindowSizeWidth.Value = 1280;
|
UI.WindowStartup.WindowSizeWidth.Value = 1280;
|
||||||
UI.WindowStartup.WindowSizeHeight.Value = 760;
|
UI.WindowStartup.WindowSizeHeight.Value = 760;
|
||||||
|
|||||||
47
src/Ryujinx/Utilities/StorageProviderExtensions.cs
Normal file
47
src/Ryujinx/Utilities/StorageProviderExtensions.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
using Avalonia.Platform.Storage;
|
||||||
|
using Gommon;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Ryujinx.Ava.Utilities
|
||||||
|
{
|
||||||
|
public static class StorageProviderExtensions
|
||||||
|
{
|
||||||
|
public static async Task<Optional<IStorageFolder>> OpenSingleFolderPickerAsync(this IStorageProvider storageProvider, FolderPickerOpenOptions openOptions = null) =>
|
||||||
|
await storageProvider.OpenFolderPickerAsync(FixOpenOptions(openOptions, false))
|
||||||
|
.Then(folders => folders.FindFirst());
|
||||||
|
|
||||||
|
public static async Task<Optional<IStorageFile>> OpenSingleFilePickerAsync(this IStorageProvider storageProvider, FilePickerOpenOptions openOptions = null) =>
|
||||||
|
await storageProvider.OpenFilePickerAsync(FixOpenOptions(openOptions, false))
|
||||||
|
.Then(files => files.FindFirst());
|
||||||
|
|
||||||
|
public static async Task<Optional<IReadOnlyList<IStorageFolder>>> OpenMultiFolderPickerAsync(this IStorageProvider storageProvider, FolderPickerOpenOptions openOptions = null) =>
|
||||||
|
await storageProvider.OpenFolderPickerAsync(FixOpenOptions(openOptions, true))
|
||||||
|
.Then(folders => folders.Count > 0 ? Optional.Of(folders) : default);
|
||||||
|
|
||||||
|
public static async Task<Optional<IReadOnlyList<IStorageFile>>> OpenMultiFilePickerAsync(this IStorageProvider storageProvider, FilePickerOpenOptions openOptions = null) =>
|
||||||
|
await storageProvider.OpenFilePickerAsync(FixOpenOptions(openOptions, true))
|
||||||
|
.Then(files => files.Count > 0 ? Optional.Of(files) : default);
|
||||||
|
|
||||||
|
private static FilePickerOpenOptions FixOpenOptions(this FilePickerOpenOptions openOptions, bool allowMultiple)
|
||||||
|
{
|
||||||
|
if (openOptions is null)
|
||||||
|
return new FilePickerOpenOptions { AllowMultiple = allowMultiple };
|
||||||
|
|
||||||
|
openOptions.AllowMultiple = allowMultiple;
|
||||||
|
|
||||||
|
return openOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static FolderPickerOpenOptions FixOpenOptions(this FolderPickerOpenOptions openOptions, bool allowMultiple)
|
||||||
|
{
|
||||||
|
if (openOptions is null)
|
||||||
|
return new FolderPickerOpenOptions { AllowMultiple = allowMultiple };
|
||||||
|
|
||||||
|
openOptions.AllowMultiple = allowMultiple;
|
||||||
|
|
||||||
|
return openOptions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user