Added GUI option to open shader folder & Fixed typo
This commit is contained in:
parent
8fb330a24a
commit
10dabfd12d
3 changed files with 33 additions and 2 deletions
|
@ -300,7 +300,7 @@ namespace Ryujinx.Ui
|
|||
|
||||
// Shader cache setup.
|
||||
string basePath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ryujinx");
|
||||
string workPath = System.IO.Path.Combine(basePath, "games", _device.System.TitleIdText, "cache", "gpu");
|
||||
string workPath = System.IO.Path.Combine(basePath, "shaders", _device.System.TitleIdText);
|
||||
|
||||
_device.Gpu.SetShaderCachePath(workPath);
|
||||
_device.Gpu.LoadShaderCache();
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace Ryujinx.Ui
|
|||
#pragma warning disable CS0649
|
||||
#pragma warning disable IDE0044
|
||||
[GUI] MenuItem _openSaveDir;
|
||||
[GUI] MenuItem _openShaderDir;
|
||||
[GUI] MenuItem _extractRomFs;
|
||||
[GUI] MenuItem _extractExeFs;
|
||||
[GUI] MenuItem _extractLogo;
|
||||
|
@ -45,6 +46,7 @@ namespace Ryujinx.Ui
|
|||
builder.Autoconnect(this);
|
||||
|
||||
_openSaveDir.Activated += OpenSaveDir_Clicked;
|
||||
_openShaderDir.Activated += OpenShaderDir_Clicked;
|
||||
_extractRomFs.Activated += ExtractRomFs_Clicked;
|
||||
_extractExeFs.Activated += ExtractExeFs_Clicked;
|
||||
_extractLogo.Activated += ExtractLogo_Clicked;
|
||||
|
@ -412,6 +414,26 @@ namespace Ryujinx.Ui
|
|||
});
|
||||
}
|
||||
|
||||
private void OpenShaderDir_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
string titleId = _gameTableStore.GetValue(_rowIter, 2).ToString().Split("\n")[1].ToLower();
|
||||
string basePath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ryujinx");
|
||||
|
||||
string shaderDir = System.IO.Path.Combine(basePath, "shaders", titleId);
|
||||
|
||||
if (!Directory.Exists(shaderDir))
|
||||
{
|
||||
Directory.CreateDirectory(shaderDir);
|
||||
}
|
||||
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = shaderDir,
|
||||
UseShellExecute = true,
|
||||
Verb = "open"
|
||||
});
|
||||
}
|
||||
|
||||
private void ExtractRomFs_Clicked(object sender, EventArgs args)
|
||||
{
|
||||
ExtractSection(NcaSectionType.Data);
|
||||
|
|
|
@ -9,11 +9,20 @@
|
|||
<object class="GtkMenuItem" id="_openSaveDir">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Open the folder where saves for the application is loaded</property>
|
||||
<property name="tooltip_text" translatable="yes">Open the folder where saves for the application are loaded</property>
|
||||
<property name="label" translatable="yes">Open Save Directory</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="_openShaderDir">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Open the folder where shaders for the application are loaded</property>
|
||||
<property name="label" translatable="yes">Open Shader Directory</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem">
|
||||
<property name="visible">True</property>
|
||||
|
|
Loading…
Add table
Reference in a new issue