From 23979bda2686a9d231a5939ba0f2e319f35bbd84 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Fri, 9 Feb 2024 13:10:29 -0500 Subject: [PATCH] Get rid of excessive Preview protections --- src/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs | 12 +++--------- src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml.cs | 5 +---- src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs | 9 +++------ src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml | 2 ++ 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs index bcaa08600..00464d6af 100644 --- a/src/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs @@ -277,10 +277,7 @@ namespace Ryujinx.Ava.UI.ViewModels { _virtualFileSystem = virtualFileSystem; _contentManager = contentManager; - if (Program.PreviewerDetached) - { - Task.Run(LoadTimeZones); - } + Task.Run(LoadTimeZones); } public SettingsViewModel() @@ -294,11 +291,8 @@ namespace Ryujinx.Ava.UI.ViewModels Task.Run(CheckSoundBackends); Task.Run(PopulateNetworkInterfaces); - if (Program.PreviewerDetached) - { - Task.Run(LoadAvailableGpus); - LoadCurrentConfiguration(); - } + Task.Run(LoadAvailableGpus); + LoadCurrentConfiguration(); } public async Task CheckSoundBackends() diff --git a/src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml.cs b/src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml.cs index 8829cb10b..6076a68d2 100644 --- a/src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml.cs +++ b/src/Ryujinx.Ava/UI/Windows/AmiiboWindow.axaml.cs @@ -29,10 +29,7 @@ namespace Ryujinx.Ava.UI.Windows InitializeComponent(); - if (Program.PreviewerDetached) - { - Title = $"Ryujinx {Program.Version} - " + LocaleManager.Instance[LocaleKeys.Amiibo]; - } + Title = $"Ryujinx {Program.Version} - " + LocaleManager.Instance[LocaleKeys.Amiibo]; } public bool IsScanned { get; set; } diff --git a/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs index 33a9af5b6..6bb3c5dd5 100644 --- a/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs @@ -78,13 +78,10 @@ namespace Ryujinx.Ava.UI.Windows Height = ((Height - barHeight) / Program.WindowScaleFactor) + barHeight; Width /= Program.WindowScaleFactor; - if (Program.PreviewerDetached) - { - InputManager = new InputManager(new AvaloniaKeyboardDriver(this), new SDL2GamepadDriver()); + InputManager = new InputManager(new AvaloniaKeyboardDriver(this), new SDL2GamepadDriver()); - this.GetObservable(IsActiveProperty).Subscribe(IsActiveChanged); - this.ScalingChanged += OnScalingChanged; - } + this.GetObservable(IsActiveProperty).Subscribe(IsActiveChanged); + this.ScalingChanged += OnScalingChanged; } protected override void OnApplyTemplate(TemplateAppliedEventArgs e) diff --git a/src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml b/src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml index 40cac90dd..c1db0b3d9 100644 --- a/src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml +++ b/src/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml @@ -17,6 +17,8 @@ WindowStartupLocation="CenterOwner" x:DataType="viewModels:SettingsViewModel" mc:Ignorable="d" + d:DesignHeight="800" + d:DesignWidth="1000" Focusable="True">