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