diff options
Diffstat (limited to 'Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs')
-rw-r--r-- | Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs index a5e3c06a..73e5e099 100644 --- a/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs +++ b/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs @@ -12,6 +12,7 @@ using Ryujinx.Ava.Ui.Applet; using Ryujinx.Ava.Ui.Controls; using Ryujinx.Ava.Ui.Models; using Ryujinx.Ava.Ui.ViewModels; +using Ryujinx.Ava.Ui.Vulkan; using Ryujinx.Common.Configuration; using Ryujinx.Common.Logging; using Ryujinx.Graphics.Gpu; @@ -59,7 +60,7 @@ namespace Ryujinx.Ava.Ui.Windows internal AppHost AppHost { get; private set; } public InputManager InputManager { get; private set; } - internal RendererControl GlRenderer { get; private set; } + internal RendererControl RendererControl { get; private set; } internal MainWindowViewModel ViewModel { get; private set; } public SettingsWindow SettingsWindow { get; set; } @@ -140,7 +141,8 @@ namespace Ryujinx.Ava.Ui.Windows ViewModel.AspectRatioStatusText = args.AspectRatio; ViewModel.GameStatusText = args.GameStatus; ViewModel.FifoStatusText = args.FifoStatus; - ViewModel.GpuStatusText = args.GpuName; + ViewModel.GpuNameText = args.GpuName; + ViewModel.BackendText = args.GpuBackend; ViewModel.ShowStatusSeparator = true; }); @@ -237,8 +239,8 @@ namespace Ryujinx.Ava.Ui.Windows _mainViewContent = MainContent.Content as Control; - GlRenderer = new RendererControl(3, 3, ConfigurationState.Instance.Logger.GraphicsDebugLevel); - AppHost = new AppHost(GlRenderer, InputManager, path, VirtualFileSystem, ContentManager, AccountManager, _userChannelPersistence, this); + RendererControl = Program.UseVulkan ? new VulkanRendererControl(ConfigurationState.Instance.Logger.GraphicsDebugLevel) : new OpenGLRendererControl(3, 3, ConfigurationState.Instance.Logger.GraphicsDebugLevel); + AppHost = new AppHost(RendererControl, InputManager, path, VirtualFileSystem, ContentManager, AccountManager, _userChannelPersistence, this); if (!AppHost.LoadGuestApplication().Result) { @@ -262,7 +264,7 @@ namespace Ryujinx.Ava.Ui.Windows private void InitializeGame() { - GlRenderer.GlInitialized += GlRenderer_Created; + RendererControl.RendererInitialized += GlRenderer_Created; AppHost.StatusUpdatedEvent += Update_StatusBar; AppHost.AppExit += AppHost_AppExit; @@ -302,14 +304,14 @@ namespace Ryujinx.Ava.Ui.Windows Dispatcher.UIThread.InvokeAsync(() => { - MainContent.Content = GlRenderer; + MainContent.Content = RendererControl; if (startFullscreen && WindowState != WindowState.FullScreen) { ViewModel.ToggleFullscreen(); } - GlRenderer.Focus(); + RendererControl.Focus(); }); } @@ -361,8 +363,9 @@ namespace Ryujinx.Ava.Ui.Windows HandleRelaunch(); }); - GlRenderer.GlInitialized -= GlRenderer_Created; - GlRenderer = null; + + RendererControl.RendererInitialized -= GlRenderer_Created; + RendererControl = null; ViewModel.SelectedIcon = null; @@ -513,6 +516,7 @@ namespace Ryujinx.Ava.Ui.Windows GraphicsConfig.MaxAnisotropy = ConfigurationState.Instance.Graphics.MaxAnisotropy; GraphicsConfig.ShadersDumpPath = ConfigurationState.Instance.Graphics.ShadersDumpPath; GraphicsConfig.EnableShaderCache = ConfigurationState.Instance.Graphics.EnableShaderCache; + GraphicsConfig.EnableTextureRecompression = ConfigurationState.Instance.Graphics.EnableTextureRecompression; } public void LoadHotKeys() |