mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-04 21:48:54 +02:00
Initial texture replacement implementation
Unmerged PR #5632, originally by @gdkchan * Add mod manager support - @KeatonTheBot * Remove redundant code - @KeatonTheBot * Optimize, modernize code to newer C# standards where appropriate - @KeatonTheBot Co-authored-by: KeatonTheBot <keaton@ryujinx.app>
This commit is contained in:
committed by
KeatonTheBot
co-authored by
KeatonTheBot
parent
d00bda7e53
commit
812cecd713
@@ -141,6 +141,15 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
Mods.Add(new ModModel(mod.Path.FullName, mod.Name, mod.Enabled, inSd));
|
||||
}
|
||||
|
||||
foreach (var mod in modCache.TextureDirs)
|
||||
{
|
||||
var modModel = new ModModel(mod.Path.Parent?.FullName, mod.Name, mod.Enabled, inSd);
|
||||
if (Mods.All(x => x.Path != mod.Path.Parent?.FullName))
|
||||
{
|
||||
Mods.Add(modModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Sort();
|
||||
|
||||
@@ -295,6 +295,11 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public string TextureDumpPath { get; set; }
|
||||
public int TextureDumpFormatIndex { get; set; }
|
||||
public bool EnableTextureDump { get; set; }
|
||||
public bool EnableTextureRealTimeEditing { get; set; }
|
||||
|
||||
public int Language { get; set; }
|
||||
public int Region { get; set; }
|
||||
public int FsGlobalAccessLogMode { get; set; }
|
||||
@@ -652,6 +657,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
AspectRatio = (int)config.Graphics.AspectRatio.Value;
|
||||
GraphicsBackendMultithreadingIndex = (int)config.Graphics.BackendThreading.Value;
|
||||
ShaderDumpPath = config.Graphics.ShadersDumpPath;
|
||||
TextureDumpPath = config.Graphics.TexturesDumpPath.Value;
|
||||
TextureDumpFormatIndex = (int)config.Graphics.TexturesDumpFileFormat.Value;
|
||||
EnableTextureDump = config.Graphics.EnableTextureDump.Value;
|
||||
EnableTextureRealTimeEditing = config.Graphics.EnableTextureRealTimeEdit.Value;
|
||||
AntiAliasingEffect = (int)config.Graphics.AntiAliasing.Value;
|
||||
ScalingFilter = (int)config.Graphics.ScalingFilter.Value;
|
||||
ScalingFilterLevel = config.Graphics.ScalingFilterLevel.Value;
|
||||
@@ -777,6 +786,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
|
||||
config.Graphics.BackendThreading.Value = (BackendThreading)GraphicsBackendMultithreadingIndex;
|
||||
config.Graphics.ShadersDumpPath.Value = ShaderDumpPath;
|
||||
config.Graphics.TexturesDumpPath.Value = TextureDumpPath;
|
||||
config.Graphics.TexturesDumpFileFormat.Value = (TextureFileFormat)TextureDumpFormatIndex;
|
||||
config.Graphics.EnableTextureDump.Value = EnableTextureDump;
|
||||
config.Graphics.EnableTextureRealTimeEdit.Value = EnableTextureRealTimeEditing;
|
||||
|
||||
// Audio
|
||||
AudioBackend audioBackend = (AudioBackend)AudioBackend;
|
||||
|
||||
@@ -269,6 +269,48 @@
|
||||
ToolTip.Tip="{locale:Locale ShaderDumpPathTooltip}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Vertical"
|
||||
Spacing="10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
ToolTip.Tip="{locale:Locale TextureDumpPathTooltip}"
|
||||
Text="{locale:Locale SettingsTabGraphicsTextureDumpPath}"
|
||||
Width="250" />
|
||||
<TextBox Text="{Binding TextureDumpPath}"
|
||||
Width="350"
|
||||
ToolTip.Tip="{locale:Locale TextureDumpPathTooltip}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
ToolTip.Tip="{locale:Locale GraphicsTextureDumpFormatTooltip}"
|
||||
Text="{locale:Locale SettingsTabGraphicsTextureDumpFormat}"
|
||||
Width="250" />
|
||||
<ComboBox Width="350"
|
||||
HorizontalContentAlignment="Left"
|
||||
ToolTip.Tip="{locale:Locale GraphicsTextureDumpFormatTooltip}"
|
||||
SelectedIndex="{Binding TextureDumpFormatIndex}">
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{locale:Locale SettingsTabGraphicsTextureDumpFormatDds}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{locale:Locale SettingsTabGraphicsTextureDumpFormatPng}" />
|
||||
</ComboBoxItem>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<CheckBox IsChecked="{Binding EnableTextureDump}"
|
||||
ToolTip.Tip="{locale:Locale GraphicsEnableTextureDumpTooltip}">
|
||||
<TextBlock Text="{locale:Locale SettingsTabGraphicsEnableTextureDump}" />
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding EnableTextureRealTimeEditing}"
|
||||
ToolTip.Tip="{locale:Locale GraphicsEnableTextureRealTimeEditingTooltip}">
|
||||
<TextBlock Text="{locale:Locale SettingsTabGraphicsEnableTextureRealTimeEditing}" />
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -13,6 +13,7 @@ using Ryujinx.Ava.Input;
|
||||
using Ryujinx.Ava.UI.Applet;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.Gpu;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
@@ -577,6 +578,10 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
GraphicsConfig.EnableShaderCache = ConfigurationState.Instance.Graphics.EnableShaderCache;
|
||||
GraphicsConfig.EnableTextureRecompression = ConfigurationState.Instance.Graphics.EnableTextureRecompression;
|
||||
GraphicsConfig.EnableMacroHLE = ConfigurationState.Instance.Graphics.EnableMacroHLE;
|
||||
GraphicsConfig.TextureDumpPath = ConfigurationState.Instance.Graphics.TexturesDumpPath;
|
||||
GraphicsConfig.TextureDumpFormatPng = ConfigurationState.Instance.Graphics.TexturesDumpFileFormat == TextureFileFormat.Png;
|
||||
GraphicsConfig.EnableTextureDump = ConfigurationState.Instance.Graphics.EnableTextureDump;
|
||||
GraphicsConfig.EnableTextureRealTimeEdit = ConfigurationState.Instance.Graphics.EnableTextureRealTimeEdit;
|
||||
#pragma warning restore IDE0055
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user