mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-09-12 22:52:17 -06:00
Compare commits
4 Commits
master
...
e659c9ea75
Author | SHA1 | Date | |
---|---|---|---|
e659c9ea75 | |||
613bf51b0a | |||
6af6412443 | |||
b17e49f09d |
File diff suppressed because it is too large
Load Diff
@ -38,6 +38,7 @@
|
||||
<Color x:Key="Unbounded">#FFFF4554</Color>
|
||||
<Color x:Key="Custom">#6483F5</Color>
|
||||
<Color x:Key="Warning">#800080</Color>
|
||||
<Color x:Key="CustomConfig">#0118D8</Color>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<SolidColorBrush x:Key="DataGridSelectionBackgroundBrush"
|
||||
@ -57,6 +58,7 @@
|
||||
<Color x:Key="Unbounded">#FFFF4554</Color>
|
||||
<Color x:Key="Custom">#6483F5</Color>
|
||||
<Color x:Key="Warning">#FFA500</Color>
|
||||
<Color x:Key="CustomConfig">#00FBFF</Color>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
@ -101,8 +101,8 @@ namespace Ryujinx.Ava.Systems
|
||||
await Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
string newVersionString = ReleaseInformation.IsCanaryBuild
|
||||
? $"Canary {currentVersion} -> Canary {newVersion}"
|
||||
: $"{currentVersion} -> {newVersion}";
|
||||
? $"Canary {currentVersion} → Canary {newVersion}"
|
||||
: $"{currentVersion} → {newVersion}";
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, $"Version found: {newVersionString}");
|
||||
|
||||
|
@ -114,16 +114,20 @@
|
||||
Header="{ext:Locale GameListContextMenuCacheManagementPurgePptc}"
|
||||
Icon="{ext:Icon fa-solid fa-arrow-rotate-right}"
|
||||
ToolTip.Tip="{ext:Locale GameListContextMenuCacheManagementPurgePptcToolTip}" />
|
||||
<Separator/>
|
||||
<MenuItem
|
||||
Command="{Binding NukePtcCache}"
|
||||
CommandParameter="{Binding}"
|
||||
Header="{ext:Locale GameListContextMenuCacheManagementNukePptc}"
|
||||
Icon="{ext:Icon fa-solid fa-trash-can}" />
|
||||
Icon="{ext:Icon fa-solid fa-trash-can}"
|
||||
IsEnabled="{Binding HasPtcCacheFiles}" />
|
||||
<MenuItem
|
||||
Command="{Binding PurgeShaderCache}"
|
||||
CommandParameter="{Binding}"
|
||||
Header="{ext:Locale GameListContextMenuCacheManagementPurgeShaderCache}"
|
||||
Icon="{ext:Icon fa-solid fa-trash-can}" />
|
||||
Icon="{ext:Icon fa-solid fa-trash-can}"
|
||||
IsEnabled="{Binding HasShaderCacheFiles}" />
|
||||
<Separator/>
|
||||
<MenuItem
|
||||
Command="{Binding OpenPtcDirectory}"
|
||||
CommandParameter="{Binding}"
|
||||
|
@ -353,9 +353,9 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
title,
|
||||
primary,
|
||||
secondaryText,
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogYes],
|
||||
LocaleManager.Instance[LocaleKeys.DialogUpdaterShowChangelogMessage],
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogYes],
|
||||
(int)Symbol.Help,
|
||||
UserResult.Yes);
|
||||
|
||||
|
@ -1897,7 +1897,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
secondaryText,
|
||||
LocaleManager.Instance[LocaleKeys.Continue],
|
||||
LocaleManager.Instance[LocaleKeys.Cancel],
|
||||
LocaleManager.Instance[LocaleKeys.TrimXCIFileDialogTitle]
|
||||
LocaleManager.Instance[LocaleKeys.GameListContextMenuTrimXCI]
|
||||
);
|
||||
|
||||
if (result == UserResult.Yes)
|
||||
@ -2121,7 +2121,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
});
|
||||
|
||||
public static AsyncRelayCommand<MainWindowViewModel> NukePtcCache { get; } =
|
||||
Commands.CreateConditional<MainWindowViewModel>(vm => vm?.SelectedApplication != null,
|
||||
Commands.CreateConditional<MainWindowViewModel>(vm => vm?.SelectedApplication != null &&
|
||||
HasPtcCacheFiles(vm),
|
||||
async viewModel =>
|
||||
{
|
||||
UserResult result = await ContentDialogHelper.CreateLocalizedConfirmationDialog(
|
||||
@ -2170,8 +2171,22 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
}
|
||||
});
|
||||
|
||||
private static bool HasPtcCacheFiles(MainWindowViewModel vm)
|
||||
{
|
||||
if (vm?.SelectedApplication == null) return false;
|
||||
|
||||
DirectoryInfo mainDir = new(Path.Combine(AppDataManager.GamesDirPath,
|
||||
vm.SelectedApplication.IdString, "cache", "cpu", "0"));
|
||||
DirectoryInfo backupDir = new(Path.Combine(AppDataManager.GamesDirPath,
|
||||
vm.SelectedApplication.IdString, "cache", "cpu", "1"));
|
||||
|
||||
return (mainDir.Exists && (mainDir.EnumerateFiles("*.cache").Any() || mainDir.EnumerateFiles("*.info").Any())) ||
|
||||
(backupDir.Exists && (backupDir.EnumerateFiles("*.cache").Any() || backupDir.EnumerateFiles("*.info").Any()));
|
||||
}
|
||||
|
||||
public static AsyncRelayCommand<MainWindowViewModel> PurgeShaderCache { get; } =
|
||||
Commands.CreateConditional<MainWindowViewModel>(vm => vm?.SelectedApplication != null,
|
||||
Commands.CreateConditional<MainWindowViewModel>(vm => vm?.SelectedApplication != null &&
|
||||
HasShaderCacheFiles(vm),
|
||||
async viewModel =>
|
||||
{
|
||||
UserResult result = await ContentDialogHelper.CreateLocalizedConfirmationDialog(
|
||||
@ -2228,6 +2243,21 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
}
|
||||
});
|
||||
|
||||
private static bool HasShaderCacheFiles(MainWindowViewModel vm)
|
||||
{
|
||||
if (vm?.SelectedApplication == null) return false;
|
||||
|
||||
DirectoryInfo shaderCacheDir = new(Path.Combine(AppDataManager.GamesDirPath,
|
||||
vm.SelectedApplication.IdString, "cache", "shader"));
|
||||
|
||||
if (!shaderCacheDir.Exists) return false;
|
||||
|
||||
// Check for directories or specific cache files
|
||||
return shaderCacheDir.EnumerateDirectories("*").Any() ||
|
||||
shaderCacheDir.GetFiles("*.toc").Any() ||
|
||||
shaderCacheDir.GetFiles("*.data").Any();
|
||||
}
|
||||
|
||||
public static RelayCommand<MainWindowViewModel> OpenPtcDirectory { get; } =
|
||||
Commands.CreateConditional<MainWindowViewModel>(vm => vm?.SelectedApplication != null,
|
||||
viewModel =>
|
||||
|
@ -27,11 +27,6 @@
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{ext:Locale CommonSort}" />
|
||||
<DropDownButton
|
||||
Width="150"
|
||||
HorizontalAlignment="Left"
|
||||
|
@ -235,11 +235,6 @@
|
||||
Name="AboutWindowMenuItem"
|
||||
Header="{ext:Locale MenuBarHelpAbout}"
|
||||
Icon="{ext:Icon fa-solid fa-circle-info}" />
|
||||
<MenuItem
|
||||
Name="UpdateMenuItem"
|
||||
IsEnabled="{Binding CanUpdate}"
|
||||
Header="{ext:Locale MenuBarHelpCheckForUpdates}"
|
||||
Icon="{ext:Icon fa-solid fa-rotate}" />
|
||||
<MenuItem
|
||||
Name="CompatibilityListMenuItem"
|
||||
Header="{ext:Locale CompatibilityListOpen}"
|
||||
@ -255,21 +250,24 @@
|
||||
Name="SetupGuideMenuItem"
|
||||
Header="{ext:Locale MenuBarHelpSetup}"
|
||||
Icon="{ext:Icon fa-brands fa-gitlab}"
|
||||
CommandParameter="{x:Static common:SharedConstants.SetupGuideWikiUrl}"
|
||||
ToolTip.Tip="{ext:Locale MenuBarHelpSetupTooltip}" />
|
||||
CommandParameter="{x:Static common:SharedConstants.SetupGuideWikiUrl}" />
|
||||
<MenuItem
|
||||
Name="LdnGuideMenuItem"
|
||||
Header="{ext:Locale MenuBarHelpMultiplayer}"
|
||||
Icon="{ext:Icon fa-brands fa-gitlab}"
|
||||
CommandParameter="{x:Static common:SharedConstants.MultiplayerWikiUrl}"
|
||||
ToolTip.Tip="{ext:Locale MenuBarHelpMultiplayerTooltip}" />
|
||||
CommandParameter="{x:Static common:SharedConstants.MultiplayerWikiUrl}" />
|
||||
<MenuItem
|
||||
Name="FaqMenuItem"
|
||||
Header="{ext:Locale MenuBarHelpFaq}"
|
||||
Icon="{ext:Icon fa-brands fa-gitlab}"
|
||||
CommandParameter="{x:Static common:SharedConstants.FaqWikiUrl}"
|
||||
ToolTip.Tip="{ext:Locale MenuBarHelpFaqTooltip}" />
|
||||
CommandParameter="{x:Static common:SharedConstants.FaqWikiUrl}" />
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem
|
||||
Name="UpdateMenuItem"
|
||||
IsEnabled="{Binding CanUpdate}"
|
||||
Header="{ext:Locale MenuBarHelpCheckForUpdates}"
|
||||
Icon="{ext:Icon fa-solid fa-rotate}" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</DockPanel>
|
||||
|
@ -46,10 +46,6 @@
|
||||
FontFamily="avares://FluentAvalonia/Fonts#Symbols"
|
||||
Glyph="{helpers:GlyphValueConverter Grid}" />
|
||||
</Button>
|
||||
<TextBlock
|
||||
Margin="10,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{ext:Locale IconSize}" />
|
||||
<controls:SliderScroll
|
||||
Width="150"
|
||||
Height="35"
|
||||
@ -171,11 +167,5 @@
|
||||
</Flyout>
|
||||
</DropDownButton.Flyout>
|
||||
</DropDownButton>
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"
|
||||
Text="{ext:Locale CommonSort}" />
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
@ -77,7 +77,7 @@
|
||||
Text="{ext:Locale GameSpecificConfigurationHeader}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap"
|
||||
Foreground="{DynamicResource Warning}" />
|
||||
Foreground="{DynamicResource CustomConfig}" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</Grid>
|
||||
@ -95,8 +95,6 @@
|
||||
Margin="15,35,5,15"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Width="90"
|
||||
Height="20"
|
||||
CornerRadius="4"
|
||||
IsVisible="{Binding HasIndependentConfiguration}"
|
||||
Background="{DynamicResource ThemeContentBackgroundColor}">
|
||||
@ -105,7 +103,11 @@
|
||||
VerticalAlignment="Center"
|
||||
Text="{ext:Locale GameSpecificConfigurationHeader}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
TextWrapping="Wrap"
|
||||
Padding="5"
|
||||
MaxWidth="125"
|
||||
MinWidth="90"
|
||||
Foreground="{DynamicResource CustomConfig}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
@ -175,7 +175,7 @@
|
||||
Text="{ext:Locale GameSpecificConfigurationHeader}"
|
||||
TextAlignment="Start"
|
||||
TextWrapping="Wrap"
|
||||
Foreground="{DynamicResource Warning}" />
|
||||
Foreground="{DynamicResource CustomConfig}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="4"
|
||||
|
@ -28,7 +28,6 @@
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center">
|
||||
<Label Content="{ext:Locale CommonSort}" VerticalAlignment="Center" />
|
||||
<ComboBox SelectedIndex="{Binding SortIndex}" Width="100">
|
||||
<ComboBoxItem>
|
||||
<Label
|
||||
|
@ -32,12 +32,6 @@
|
||||
Watermark="{ext:Locale CompatibilityListSearchBoxWatermarkWithCount}"
|
||||
TextChanged="TextBox_OnTextChanged"/>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="10, 5, 0, 5">
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"
|
||||
Text="{ext:Locale CommonSort}" />
|
||||
<DropDownButton
|
||||
Width="150"
|
||||
HorizontalAlignment="Right"
|
||||
@ -102,12 +96,6 @@
|
||||
<Grid Grid.Row="0" ColumnDefinitions="*,Auto,Auto,Auto" Name="NormalControls">
|
||||
<TextBox Name="SearchBoxNormal" Grid.Column="0" Margin="15, 5, 0, 5" HorizontalAlignment="Stretch" Watermark="{ext:Locale CompatibilityListSearchBoxWatermarkWithCount}" TextChanged="TextBox_OnTextChanged" />
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="10, 5, 5, 5">
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"
|
||||
Text="{ext:Locale CommonSort}" />
|
||||
<DropDownButton
|
||||
Width="150"
|
||||
HorizontalAlignment="Right"
|
||||
|
Reference in New Issue
Block a user