aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx')
-rw-r--r--Ryujinx/Program.cs45
-rw-r--r--Ryujinx/Ryujinx.csproj2
-rw-r--r--Ryujinx/Ui/GLRenderer.cs6
-rw-r--r--Ryujinx/Ui/MainWindow.cs42
-rw-r--r--Ryujinx/Ui/MainWindow.glade27
-rw-r--r--Ryujinx/Ui/RendererWidgetBase.cs16
-rw-r--r--Ryujinx/Ui/StatusUpdatedEventArgs.cs4
-rw-r--r--Ryujinx/Ui/VKRenderer.cs4
-rw-r--r--Ryujinx/Ui/Windows/SettingsWindow.cs130
-rw-r--r--Ryujinx/Ui/Windows/SettingsWindow.glade116
10 files changed, 316 insertions, 76 deletions
diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs
index 18b8d4d0..d9db941d 100644
--- a/Ryujinx/Program.cs
+++ b/Ryujinx/Program.cs
@@ -13,8 +13,8 @@ using Ryujinx.Ui.Common;
using Ryujinx.Ui.Widgets;
using SixLabors.ImageSharp.Formats.Jpeg;
using System;
+using System.Collections.Generic;
using System.IO;
-using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
@@ -140,6 +140,8 @@ namespace Ryujinx
? appDataConfigurationPath
: null;
+ bool showVulkanPrompt = false;
+
if (ConfigurationPath == null)
{
// No configuration, we load the default values and save it to disk
@@ -147,16 +149,26 @@ namespace Ryujinx
ConfigurationState.Instance.LoadDefault();
ConfigurationState.Instance.ToFileFormat().SaveConfig(ConfigurationPath);
+
+ showVulkanPrompt = true;
}
else
{
if (ConfigurationFileFormat.TryLoad(ConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
{
- ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
+ ConfigurationLoadResult result = ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
+
+ if ((result & ConfigurationLoadResult.MigratedFromPreVulkan) != 0)
+ {
+ showVulkanPrompt = true;
+ }
}
else
{
ConfigurationState.Instance.LoadDefault();
+
+ showVulkanPrompt = true;
+
Logger.Warning?.PrintMsg(LogClass.Application, $"Failed to load config! Loading the default config instead.\nFailed config location {ConfigurationPath}");
}
}
@@ -196,6 +208,35 @@ namespace Ryujinx
}, TaskContinuationOptions.OnlyOnFaulted);
}
+ if (showVulkanPrompt)
+ {
+ var buttonTexts = new Dictionary<int, string>()
+ {
+ { 0, "Yes (Vulkan)" },
+ { 1, "No (OpenGL)" }
+ };
+
+ ResponseType response = GtkDialog.CreateCustomDialog(
+ "Ryujinx - Default graphics backend",
+ "Use Vulkan as default graphics backend?",
+ "Ryujinx now supports the Vulkan API. " +
+ "Vulkan greatly improves shader compilation performance, " +
+ "and fixes some graphical glitches; however, since it is a new feature, " +
+ "you may experience some issues that did not occur with OpenGL.\n\n" +
+ "Note that you will also lose any existing shader cache the first time you start a game " +
+ "on version 1.1.200 onwards, because Vulkan required changes to the shader cache that makes it incompatible with previous versions.\n\n" +
+ "Would you like to set Vulkan as the default graphics backend? " +
+ "You can change this at any time on the settings window.",
+ buttonTexts,
+ MessageType.Question);
+
+ ConfigurationState.Instance.Graphics.GraphicsBackend.Value = response == 0
+ ? GraphicsBackend.Vulkan
+ : GraphicsBackend.OpenGl;
+
+ ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath);
+ }
+
Application.Run();
}
diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj
index 4dc50f9f..32c22b56 100644
--- a/Ryujinx/Ryujinx.csproj
+++ b/Ryujinx/Ryujinx.csproj
@@ -19,6 +19,7 @@
<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.22.25.128" />
<PackageReference Include="GtkSharp.Dependencies" Version="1.1.1" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'osx-x64'" />
+ <PackageReference Include="OpenTK.Core" Version="4.7.2" />
<PackageReference Include="Ryujinx.Graphics.Nvdec.Dependencies" Version="5.0.1-build10" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'osx-x64'" />
<PackageReference Include="Ryujinx.Audio.OpenAL.Dependencies" Version="1.21.0.1" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'osx-x64'" />
<PackageReference Include="OpenTK.Graphics" Version="4.7.2" />
@@ -37,6 +38,7 @@
<ProjectReference Include="..\Ryujinx.HLE\Ryujinx.HLE.csproj" />
<ProjectReference Include="..\ARMeilleure\ARMeilleure.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj" />
+ <ProjectReference Include="..\Ryujinx.Graphics.Vulkan\Ryujinx.Graphics.Vulkan.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.Gpu\Ryujinx.Graphics.Gpu.csproj" />
<ProjectReference Include="..\Ryujinx.Ui.Common\Ryujinx.Ui.Common.csproj" />
</ItemGroup>
diff --git a/Ryujinx/Ui/GLRenderer.cs b/Ryujinx/Ui/GLRenderer.cs
index 45eb53cb..55baaa12 100644
--- a/Ryujinx/Ui/GLRenderer.cs
+++ b/Ryujinx/Ui/GLRenderer.cs
@@ -93,7 +93,7 @@ namespace Ryujinx.Ui
public override void InitializeRenderer()
{
// First take exclusivity on the OpenGL context.
- ((Renderer)Renderer).InitializeBackgroundContext(SPBOpenGLContext.CreateBackgroundContext(_openGLContext));
+ ((OpenGLRenderer)Renderer).InitializeBackgroundContext(SPBOpenGLContext.CreateBackgroundContext(_openGLContext));
_openGLContext.MakeCurrent(_nativeWindow);
@@ -127,9 +127,9 @@ namespace Ryujinx.Ui
_nativeWindow.SwapBuffers();
}
- public override string GetGpuVendorName()
+ protected override string GetGpuBackendName()
{
- return ((Renderer)Renderer).GpuVendor;
+ return "OpenGL";
}
protected override void Dispose(bool disposing)
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs
index afd37d3f..c0b2e1b6 100644
--- a/Ryujinx/Ui/MainWindow.cs
+++ b/Ryujinx/Ui/MainWindow.cs
@@ -19,6 +19,7 @@ using Ryujinx.Common.System;
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.GAL.Multithreading;
using Ryujinx.Graphics.OpenGL;
+using Ryujinx.Graphics.Vulkan;
using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS;
using Ryujinx.HLE.HOS.Services.Account.Acc;
@@ -27,7 +28,6 @@ using Ryujinx.Input.GTK3;
using Ryujinx.Input.HLE;
using Ryujinx.Input.SDL2;
using Ryujinx.Modules;
-using Ryujinx.Ui.App;
using Ryujinx.Ui.App.Common;
using Ryujinx.Ui.Applet;
using Ryujinx.Ui.Common;
@@ -36,6 +36,8 @@ using Ryujinx.Ui.Common.Helper;
using Ryujinx.Ui.Helper;
using Ryujinx.Ui.Widgets;
using Ryujinx.Ui.Windows;
+using Silk.NET.Vulkan;
+using SPB.Graphics.Vulkan;
using System;
using System.Diagnostics;
using System.IO;
@@ -81,8 +83,6 @@ namespace Ryujinx.Ui
public bool IsFocused;
- private static bool UseVulkan = false;
-
#pragma warning disable CS0169, CS0649, IDE0044
[GUI] public MenuItem ExitMenuItem;
@@ -120,6 +120,7 @@ namespace Ryujinx.Ui
[GUI] CheckMenuItem _fileExtToggle;
[GUI] CheckMenuItem _pathToggle;
[GUI] CheckMenuItem _fileSizeToggle;
+ [GUI] Label _gpuBackend;
[GUI] Label _dockedMode;
[GUI] Label _aspectRatio;
[GUI] Label _gameStatus;
@@ -406,13 +407,14 @@ namespace Ryujinx.Ui
IRenderer renderer;
- if (UseVulkan)
+ if (ConfigurationState.Instance.Graphics.GraphicsBackend == GraphicsBackend.Vulkan)
{
- throw new NotImplementedException();
+ string preferredGpu = ConfigurationState.Instance.Graphics.PreferredGpu.Value;
+ renderer = new VulkanRenderer(CreateVulkanSurface, VulkanHelper.GetRequiredInstanceExtensions, preferredGpu);
}
else
{
- renderer = new Renderer();
+ renderer = new OpenGLRenderer();
}
BackendThreading threadingMode = ConfigurationState.Instance.Graphics.BackendThreading;
@@ -579,6 +581,11 @@ namespace Ryujinx.Ui
_emulationContext = new HLE.Switch(configuration);
}
+ private SurfaceKHR CreateVulkanSurface(Instance instance, Vk vk)
+ {
+ return new SurfaceKHR((ulong)((VKRenderer)RendererWidget).CreateWindowSurface(instance.Handle));
+ }
+
private void SetupProgressUiHandlers()
{
Ptc.PtcStateChanged -= ProgressHandler;
@@ -875,7 +882,7 @@ namespace Ryujinx.Ui
private RendererWidgetBase CreateRendererWidget()
{
- if (UseVulkan)
+ if (ConfigurationState.Instance.Graphics.GraphicsBackend == GraphicsBackend.Vulkan)
{
return new VKRenderer(InputManager, ConfigurationState.Instance.Logger.GraphicsDebugLevel);
}
@@ -946,12 +953,8 @@ namespace Ryujinx.Ui
UpdateColumns();
UpdateGameTable();
- Task.Run(RefreshFirmwareLabel);
- Task.Run(HandleRelaunch);
-
- _actionMenu.Sensitive = false;
- _firmwareInstallFile.Sensitive = true;
- _firmwareInstallDirectory.Sensitive = true;
+ RefreshFirmwareLabel();
+ HandleRelaunch();
}
private void CreateGameWindow()
@@ -1031,10 +1034,11 @@ namespace Ryujinx.Ui
int resScale = ConfigurationState.Instance.Graphics.ResScale;
float resScaleCustom = ConfigurationState.Instance.Graphics.ResScaleCustom;
- Graphics.Gpu.GraphicsConfig.ResScale = (resScale == -1) ? resScaleCustom : resScale;
- Graphics.Gpu.GraphicsConfig.MaxAnisotropy = ConfigurationState.Instance.Graphics.MaxAnisotropy;
- Graphics.Gpu.GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath;
- Graphics.Gpu.GraphicsConfig.EnableShaderCache = ConfigurationState.Instance.Graphics.EnableShaderCache;
+ Graphics.Gpu.GraphicsConfig.ResScale = (resScale == -1) ? resScaleCustom : resScale;
+ Graphics.Gpu.GraphicsConfig.MaxAnisotropy = ConfigurationState.Instance.Graphics.MaxAnisotropy;
+ Graphics.Gpu.GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath;
+ Graphics.Gpu.GraphicsConfig.EnableShaderCache = ConfigurationState.Instance.Graphics.EnableShaderCache;
+ Graphics.Gpu.GraphicsConfig.EnableTextureRecompression = ConfigurationState.Instance.Graphics.EnableTextureRecompression;
}
public void SaveConfig()
@@ -1125,6 +1129,7 @@ namespace Ryujinx.Ui
_gpuName.Text = args.GpuName;
_dockedMode.Text = args.DockedMode;
_aspectRatio.Text = args.AspectRatio;
+ _gpuBackend.Text = args.GpuBackend;
_volumeStatus.Text = GetVolumeLabelText(args.Volume);
if (args.VSyncEnabled)
@@ -1512,6 +1517,9 @@ namespace Ryujinx.Ui
// otherwise, clear state.
_userChannelPersistence = new UserChannelPersistence();
_currentEmulatedGamePath = null;
+ _actionMenu.Sensitive = false;
+ _firmwareInstallFile.Sensitive = true;
+ _firmwareInstallDirectory.Sensitive = true;
}
}
diff --git a/Ryujinx/Ui/MainWindow.glade b/Ryujinx/Ui/MainWindow.glade
index 3154caf7..405bc43f 100644
--- a/Ryujinx/Ui/MainWindow.glade
+++ b/Ryujinx/Ui/MainWindow.glade
@@ -775,6 +775,31 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="_gpuBackend">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">12</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">13</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="_gpuName">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -785,7 +810,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">12</property>
+ <property name="position">14</property>
</packing>
</child>
</object>
diff --git a/Ryujinx/Ui/RendererWidgetBase.cs b/Ryujinx/Ui/RendererWidgetBase.cs
index a3ff4708..22e8d5c3 100644
--- a/Ryujinx/Ui/RendererWidgetBase.cs
+++ b/Ryujinx/Ui/RendererWidgetBase.cs
@@ -74,6 +74,7 @@ namespace Ryujinx.Ui
private InputManager _inputManager;
private IKeyboard _keyboardInterface;
private GraphicsDebugLevel _glLogLevel;
+ private string _gpuBackendName;
private string _gpuVendorName;
private bool _isMouseInClient;
@@ -120,7 +121,12 @@ namespace Ryujinx.Ui
public abstract void SwapBuffers(object image);
- public abstract string GetGpuVendorName();
+ protected abstract string GetGpuBackendName();
+
+ private string GetGpuVendorName()
+ {
+ return Renderer.GetHardwareInfo().GpuVendor;
+ }
private void HideCursorStateChanged(object sender, ReactiveEventArgs<bool> state)
{
@@ -227,7 +233,7 @@ namespace Ryujinx.Ui
WindowWidth = evnt.Width * monitor.ScaleFactor;
WindowHeight = evnt.Height * monitor.ScaleFactor;
- Renderer?.Window.SetSize(WindowWidth, WindowHeight);
+ Renderer?.Window?.SetSize(WindowWidth, WindowHeight);
return result;
}
@@ -308,7 +314,7 @@ namespace Ryujinx.Ui
}
Renderer = renderer;
- Renderer?.Window.SetSize(WindowWidth, WindowHeight);
+ Renderer?.Window?.SetSize(WindowWidth, WindowHeight);
if (Renderer != null)
{
@@ -387,6 +393,7 @@ namespace Ryujinx.Ui
Device.Gpu.Renderer.Initialize(_glLogLevel);
+ _gpuBackendName = GetGpuBackendName();
_gpuVendorName = GetGpuVendorName();
Device.Gpu.Renderer.RunLoop(() =>
@@ -432,6 +439,7 @@ namespace Ryujinx.Ui
StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs(
Device.EnableDeviceVsync,
Device.GetVolume(),
+ _gpuBackendName,
dockedMode,
ConfigurationState.Instance.Graphics.AspectRatio.Value.ToText(),
$"Game: {Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)",
@@ -477,7 +485,7 @@ namespace Ryujinx.Ui
renderLoopThread.Start();
Thread nvStutterWorkaround = null;
- if (Renderer is Graphics.OpenGL.Renderer)
+ if (Renderer is Graphics.OpenGL.OpenGLRenderer)
{
nvStutterWorkaround = new Thread(NVStutterWorkaround)
{
diff --git a/Ryujinx/Ui/StatusUpdatedEventArgs.cs b/Ryujinx/Ui/StatusUpdatedEventArgs.cs
index df83efa4..046597b0 100644
--- a/Ryujinx/Ui/StatusUpdatedEventArgs.cs
+++ b/Ryujinx/Ui/StatusUpdatedEventArgs.cs
@@ -11,11 +11,13 @@ namespace Ryujinx.Ui
public string GameStatus;
public string FifoStatus;
public string GpuName;
+ public string GpuBackend;
- public StatusUpdatedEventArgs(bool vSyncEnabled, float volume, string dockedMode, string aspectRatio, string gameStatus, string fifoStatus, string gpuName)
+ public StatusUpdatedEventArgs(bool vSyncEnabled, float volume, string gpuBackend, string dockedMode, string aspectRatio, string gameStatus, string fifoStatus, string gpuName)
{
VSyncEnabled = vSyncEnabled;
Volume = volume;
+ GpuBackend = gpuBackend;
DockedMode = dockedMode;
AspectRatio = aspectRatio;
GameStatus = gameStatus;
diff --git a/Ryujinx/Ui/VKRenderer.cs b/Ryujinx/Ui/VKRenderer.cs
index f6dd9ec4..d2f60de8 100644
--- a/Ryujinx/Ui/VKRenderer.cs
+++ b/Ryujinx/Ui/VKRenderer.cs
@@ -66,9 +66,9 @@ namespace Ryujinx.Ui
public override void SwapBuffers(object image) { }
- public override string GetGpuVendorName()
+ protected override string GetGpuBackendName()
{
- return "Vulkan (Unknown)";
+ return "Vulkan";
}
protected override void Dispose(bool disposing)
diff --git a/Ryujinx/Ui/Windows/SettingsWindow.cs b/Ryujinx/Ui/Windows/SettingsWindow.cs
index fef1164b..fc3373db 100644
--- a/Ryujinx/Ui/Windows/SettingsWindow.cs
+++ b/Ryujinx/Ui/Windows/SettingsWindow.cs
@@ -6,6 +6,7 @@ using Ryujinx.Audio.Backends.SoundIo;
using Ryujinx.Common.Configuration;
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Common.GraphicsDriver;
+using Ryujinx.Graphics.Vulkan;
using Ryujinx.Ui.Common.Configuration;
using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS.Services.Time.TimeZone;
@@ -53,6 +54,7 @@ namespace Ryujinx.Ui.Windows
[GUI] CheckButton _hideCursorOnIdleToggle;
[GUI] CheckButton _vSyncToggle;
[GUI] CheckButton _shaderCacheToggle;
+ [GUI] CheckButton _textureRecompressionToggle;
[GUI] CheckButton _ptcToggle;
[GUI] CheckButton _internetToggle;
[GUI] CheckButton _fsicToggle;
@@ -91,6 +93,8 @@ namespace Ryujinx.Ui.Windows
[GUI] Entry _graphicsShadersDumpPath;
[GUI] ComboBoxText _anisotropy;
[GUI] ComboBoxText _aspectRatio;
+ [GUI] ComboBoxText _graphicsBackend;
+ [GUI] ComboBoxText _preferredGpu;
[GUI] ComboBoxText _resScaleCombo;
[GUI] Entry _resScaleText;
[GUI] ToggleButton _configureController1;
@@ -229,6 +233,11 @@ namespace Ryujinx.Ui.Windows
_shaderCacheToggle.Click();
}
+ if (ConfigurationState.Instance.Graphics.EnableTextureRecompression)
+ {
+ _textureRecompressionToggle.Click();
+ }
+
if (ConfigurationState.Instance.System.EnablePtc)
{
_ptcToggle.Click();
@@ -321,6 +330,11 @@ namespace Ryujinx.Ui.Windows
_resScaleCombo.SetActiveId(ConfigurationState.Instance.Graphics.ResScale.Value.ToString());
_anisotropy.SetActiveId(ConfigurationState.Instance.Graphics.MaxAnisotropy.Value.ToString());
_aspectRatio.SetActiveId(((int)ConfigurationState.Instance.Graphics.AspectRatio.Value).ToString());
+ _graphicsBackend.SetActiveId(((int)ConfigurationState.Instance.Graphics.GraphicsBackend.Value).ToString());
+
+ UpdatePreferredGpuComboBox();
+
+ _graphicsBackend.Changed += (sender, e) => UpdatePreferredGpuComboBox();
_custThemePath.Buffer.Text = ConfigurationState.Instance.Ui.CustomThemePath;
_resScaleText.Buffer.Text = ConfigurationState.Instance.Graphics.ResScaleCustom.Value.ToString();
@@ -345,7 +359,7 @@ namespace Ryujinx.Ui.Windows
_browseThemePath.Sensitive = false;
}
- //Setup system time spinners
+ // Setup system time spinners
UpdateSystemTimeSpinners();
_audioBackendStore = new ListStore(typeof(string), typeof(AudioBackend));
@@ -419,6 +433,39 @@ namespace Ryujinx.Ui.Windows
});
}
+ private void UpdatePreferredGpuComboBox()
+ {
+ _preferredGpu.RemoveAll();
+
+ if (Enum.Parse<GraphicsBackend>(_graphicsBackend.ActiveId) == GraphicsBackend.Vulkan)
+ {
+ var devices = VulkanRenderer.GetPhysicalDevices();
+ string preferredGpuIdFromConfig = ConfigurationState.Instance.Graphics.PreferredGpu.Value;
+ string preferredGpuId = preferredGpuIdFromConfig;
+ bool noGpuId = string.IsNullOrEmpty(preferredGpuIdFromConfig);
+
+ foreach (var device in devices)
+ {
+ string dGPU = device.IsDiscrete ? " (dGPU)" : "";
+ _preferredGpu.Append(device.Id, $"{device.Name}{dGPU}");
+
+ // If there's no GPU selected yet, we just pick the first GPU.
+ // If there's a discrete GPU available, we always prefer that over the previous selection,
+ // as it is likely to have better performance and more features.
+ // If the configuration file already has a GPU selection, we always prefer that instead.
+ if (noGpuId && (string.IsNullOrEmpty(preferredGpuId) || device.IsDiscrete))
+ {
+ preferredGpuId = device.Id;
+ }
+ }
+
+ if (!string.IsNullOrEmpty(preferredGpuId))
+ {
+ _preferredGpu.SetActiveId(preferredGpuId);
+ }
+ }
+ }
+
private void UpdateSystemTimeSpinners()
{
//Bind system time events
@@ -492,45 +539,48 @@ namespace Ryujinx.Ui.Windows
DriverUtilities.ToggleOGLThreading(backendThreading == BackendThreading.Off);
}
- ConfigurationState.Instance.Logger.EnableError.Value = _errorLogToggle.Active;
- ConfigurationState.Instance.Logger.EnableTrace.Value = _traceLogToggle.Active;
- ConfigurationState.Instance.Logger.EnableWarn.Value = _warningLogToggle.Active;
- ConfigurationState.Instance.Logger.EnableInfo.Value = _infoLogToggle.Active;
- ConfigurationState.Instance.Logger.EnableStub.Value = _stubLogToggle.Active;
- ConfigurationState.Instance.Logger.EnableDebug.Value = _debugLogToggle.Active;
- ConfigurationState.Instance.Logger.EnableGuest.Value = _guestLogToggle.Active;
- ConfigurationState.Instance.Logger.EnableFsAccessLog.Value = _fsAccessLogToggle.Active;
- ConfigurationState.Instance.Logger.EnableFileLog.Value = _fileLogToggle.Active;
- ConfigurationState.Instance.Logger.GraphicsDebugLevel.Value = Enum.Parse<GraphicsDebugLevel>(_graphicsDebugLevel.ActiveId);
- ConfigurationState.Instance.System.EnableDockedMode.Value = _dockedModeToggle.Active;
- ConfigurationState.Instance.EnableDiscordIntegration.Value = _discordToggle.Active;
- ConfigurationState.Instance.CheckUpdatesOnStart.Value = _checkUpdatesToggle.Active;
- ConfigurationState.Instance.ShowConfirmExit.Value = _showConfirmExitToggle.Active;
- ConfigurationState.Instance.HideCursorOnIdle.Value = _hideCursorOnIdleToggle.Active;
- ConfigurationState.Instance.Graphics.EnableVsync.Value = _vSyncToggle.Active;
- ConfigurationState.Instance.Graphics.EnableShaderCache.Value = _shaderCacheToggle.Active;
- ConfigurationState.Instance.System.EnablePtc.Value = _ptcToggle.Active;
- ConfigurationState.Instance.System.EnableInternetAccess.Value = _internetToggle.Active;
- ConfigurationState.Instance.System.EnableFsIntegrityChecks.Value = _fsicToggle.Active;
- ConfigurationState.Instance.System.MemoryManagerMode.Value = memoryMode;
- ConfigurationState.Instance.System.ExpandRam.Value = _expandRamToggle.Active;
- ConfigurationState.Instance.System.IgnoreMissingServices.Value = _ignoreToggle.Active;
- ConfigurationState.Instance.Hid.EnableKeyboard.Value = _directKeyboardAccess.Active;
- ConfigurationState.Instance.Hid.EnableMouse.Value = _directMouseAccess.Active;
- ConfigurationState.Instance.Ui.EnableCustomTheme.Value = _custThemeToggle.Active;
- ConfigurationState.Instance.System.Language.Value = Enum.Parse<Language>(_systemLanguageSelect.ActiveId);
- ConfigurationState.Instance.System.Region.Value = Enum.Parse<Common.Configuration.System.Region>(_systemRegionSelect.ActiveId);
- ConfigurationState.Instance.System.SystemTimeOffset.Value = _systemTimeOffset;
- ConfigurationState.Instance.Ui.CustomThemePath.Value = _custThemePath.Buffer.Text;
- ConfigurationState.Instance.Graphics.ShadersDumpPath.Value = _graphicsShadersDumpPath.Buffer.Text;
- ConfigurationState.Instance.Ui.GameDirs.Value = gameDirs;
- ConfigurationState.Instance.System.FsGlobalAccessLogMode.Value = (int)_fsLogSpinAdjustment.Value;
- ConfigurationState.Instance.Graphics.MaxAnisotropy.Value = float.Parse(_anisotropy.ActiveId, CultureInfo.InvariantCulture);
- ConfigurationState.Instance.Graphics.AspectRatio.Value = Enum.Parse<AspectRatio>(_aspectRatio.ActiveId);
- ConfigurationState.Instance.Graphics.BackendThreading.Value = backendThreading;
- ConfigurationState.Instance.Graphics.ResScale.Value = int.Parse(_resScaleCombo.ActiveId);
- ConfigurationState.Instance.Graphics.ResScaleCustom.Value = resScaleCustom;
- ConfigurationState.Instance.System.AudioVolume.Value = (float)_audioVolumeSlider.Value / 100.0f;
+ ConfigurationState.Instance.Logger.EnableError.Value = _errorLogToggle.Active;
+ ConfigurationState.Instance.Logger.EnableTrace.Value = _traceLogToggle.Active;
+ ConfigurationState.Instance.Logger.EnableWarn.Value = _warningLogToggle.Active;
+ ConfigurationState.Instance.Logger.EnableInfo.Value = _infoLogToggle.Active;
+ ConfigurationState.Instance.Logger.EnableStub.Value = _stubLogToggle.Active;
+ ConfigurationState.Instance.Logger.EnableDebug.Value = _debugLogToggle.Active;
+ ConfigurationState.Instance.Logger.EnableGuest.Value = _guestLogToggle.Active;
+ ConfigurationState.Instance.Logger.EnableFsAccessLog.Value = _fsAccessLogToggle.Active;
+ ConfigurationState.Instance.Logger.EnableFileLog.Value = _fileLogToggle.Active;
+ ConfigurationState.Instance.Logger.GraphicsDebugLevel.Value = Enum.Parse<GraphicsDebugLevel>(_graphicsDebugLevel.ActiveId);
+ ConfigurationState.Instance.System.EnableDockedMode.Value = _dockedModeToggle.Active;
+ ConfigurationState.Instance.EnableDiscordIntegration.Value = _discordToggle.Active;
+ ConfigurationState.Instance.CheckUpdatesOnStart.Value = _checkUpdatesToggle.Active;
+ ConfigurationState.Instance.ShowConfirmExit.Value = _showConfirmExitToggle.Active;
+ ConfigurationState.Instance.HideCursorOnIdle.Value = _hideCursorOnIdleToggle.Active;
+ ConfigurationState.Instance.Graphics.EnableVsync.Value = _vSyncToggle.Active;
+ ConfigurationState.Instance.Graphics.EnableShaderCache.Value = _shaderCacheToggle.Active;
+ ConfigurationState.Instance.Graphics.EnableTextureRecompression.Value = _textureRecompressionToggle.Active;
+ ConfigurationState.Instance.System.EnablePtc.Value = _ptcToggle.Active;
+ ConfigurationState.Instance.System.EnableInternetAccess.Value = _internetToggle.Active;
+ ConfigurationState.Instance.System.EnableFsIntegrityChecks.Value = _fsicToggle.Active;
+ ConfigurationState.Instance.System.MemoryManagerMode.Value = memoryMode;
+ ConfigurationState.Instance.System.ExpandRam.Value = _expandRamToggle.Active;
+ ConfigurationState.Instance.System.IgnoreMissingServices.Value = _ignoreToggle.Active;
+ ConfigurationState.Instance.Hid.EnableKeyboard.Value = _directKeyboardAccess.Active;
+ ConfigurationState.Instance.Hid.EnableMouse.Value = _directMouseAccess.Active;
+ ConfigurationState.Instance.Ui.EnableCustomTheme.Value = _custThemeToggle.Active;
+ ConfigurationState.Instance.System.Language.Value = Enum.Parse<Language>(_systemLanguageSelect.ActiveId);
+ ConfigurationState.Instance.System.Region.Value = Enum.Parse<Common.Configuration.System.Region>(_systemRegionSelect.ActiveId);
+ ConfigurationState.Instance.System.SystemTimeOffset.Value = _systemTimeOffset;
+ ConfigurationState.Instance.Ui.CustomThemePath.Value = _custThemePath.Buffer.Text;
+ ConfigurationState.Instance.Graphics.ShadersDumpPath.Value = _graphicsShadersDumpPath.Buffer.Text;
+ ConfigurationState.Instance.Ui.GameDirs.Value = gameDirs;
+ ConfigurationState.Instance.System.FsGlobalAccessLogMode.Value = (int)_fsLogSpinAdjustment.Value;
+ ConfigurationState.Instance.Graphics.MaxAnisotropy.Value = float.Parse(_anisotropy.ActiveId, CultureInfo.InvariantCulture);
+ ConfigurationState.Instance.Graphics.AspectRatio.Value = Enum.Parse<AspectRatio>(_aspectRatio.ActiveId);
+ ConfigurationState.Instance.Graphics.BackendThreading.Value = backendThreading;
+ ConfigurationState.Instance.Graphics.GraphicsBackend.Value = Enum.Parse<GraphicsBackend>(_graphicsBackend.ActiveId);
+ ConfigurationState.Instance.Graphics.PreferredGpu.Value = _preferredGpu.ActiveId;
+ ConfigurationState.Instance.Graphics.ResScale.Value = int.Parse(_resScaleCombo.ActiveId);
+ ConfigurationState.Instance.Graphics.ResScaleCustom.Value = resScaleCustom;
+ ConfigurationState.Instance.System.AudioVolume.Value = (float)_audioVolumeSlider.Value / 100.0f;
_previousVolumeLevel = ConfigurationState.Instance.System.AudioVolume.Value;
diff --git a/Ryujinx/Ui/Windows/SettingsWindow.glade b/Ryujinx/Ui/Windows/SettingsWindow.glade
index 4599802a..24d36ebd 100644
--- a/Ryujinx/Ui/Windows/SettingsWindow.glade
+++ b/Ryujinx/Ui/Windows/SettingsWindow.glade
@@ -1897,9 +1897,95 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Graphics Backend to use</property>
+ <property name="label" translatable="yes">Graphics Backend:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">5</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="_graphicsBackend">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Graphics Backend to use</property>
+ <property name="active-id">-1</property>
+ <items>
+ <item id="0" translatable="yes">Vulkan</item>
+ <item id="1" translatable="yes">OpenGL</item>
+ </items>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Preferred GPU (Vulkan only)</property>
+ <property name="label" translatable="yes">Preferred GPU:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">5</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="_preferredGpu">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="tooltip-text" translatable="yes">Preferred GPU (Vulkan only)</property>
+ <property name="active-id">-1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">5</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -1967,6 +2053,24 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="_textureRecompressionToggle">
+ <property name="label" translatable="yes">Enable Texture Recompression</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes">Enables or disables Texture Recompression. Reduces VRAM usage at the cost of texture quality, and may also increase stuttering</property>
+ <property name="halign">start</property>
+ <property name="margin-top">5</property>
+ <property name="margin-bottom">5</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -2027,7 +2131,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -2075,7 +2179,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -2124,7 +2228,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
@@ -2139,7 +2243,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
- <property name="position">0</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -2151,7 +2255,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -2525,7 +2629,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="tooltip-text" translatable="yes">Requires appropriate log levels enabled.</property>
- <property name="label" translatable="yes">OpenGL Log Level</property>
+ <property name="label" translatable="yes">Graphics Backend Log Level</property>
</object>
<packing>
<property name="expand">False</property>