Get rid of excessive Preview protections

This commit is contained in:
Isaac Marovitz 2024-02-09 13:10:29 -05:00
parent 388dba1216
commit 23979bda26
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
4 changed files with 9 additions and 19 deletions

View file

@ -277,10 +277,7 @@ namespace Ryujinx.Ava.UI.ViewModels
{ {
_virtualFileSystem = virtualFileSystem; _virtualFileSystem = virtualFileSystem;
_contentManager = contentManager; _contentManager = contentManager;
if (Program.PreviewerDetached) Task.Run(LoadTimeZones);
{
Task.Run(LoadTimeZones);
}
} }
public SettingsViewModel() public SettingsViewModel()
@ -294,11 +291,8 @@ namespace Ryujinx.Ava.UI.ViewModels
Task.Run(CheckSoundBackends); Task.Run(CheckSoundBackends);
Task.Run(PopulateNetworkInterfaces); Task.Run(PopulateNetworkInterfaces);
if (Program.PreviewerDetached) Task.Run(LoadAvailableGpus);
{ LoadCurrentConfiguration();
Task.Run(LoadAvailableGpus);
LoadCurrentConfiguration();
}
} }
public async Task CheckSoundBackends() public async Task CheckSoundBackends()

View file

@ -29,10 +29,7 @@ namespace Ryujinx.Ava.UI.Windows
InitializeComponent(); 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; } public bool IsScanned { get; set; }

View file

@ -78,13 +78,10 @@ namespace Ryujinx.Ava.UI.Windows
Height = ((Height - barHeight) / Program.WindowScaleFactor) + barHeight; Height = ((Height - barHeight) / Program.WindowScaleFactor) + barHeight;
Width /= Program.WindowScaleFactor; 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.GetObservable(IsActiveProperty).Subscribe(IsActiveChanged);
this.ScalingChanged += OnScalingChanged; this.ScalingChanged += OnScalingChanged;
}
} }
protected override void OnApplyTemplate(TemplateAppliedEventArgs e) protected override void OnApplyTemplate(TemplateAppliedEventArgs e)

View file

@ -17,6 +17,8 @@
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
x:DataType="viewModels:SettingsViewModel" x:DataType="viewModels:SettingsViewModel"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="800"
d:DesignWidth="1000"
Focusable="True"> Focusable="True">
<Design.DataContext> <Design.DataContext>
<viewModels:SettingsViewModel /> <viewModels:SettingsViewModel />