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

View file

@ -29,11 +29,8 @@ namespace Ryujinx.Ava.UI.Windows
InitializeComponent();
if (Program.PreviewerDetached)
{
Title = $"Ryujinx {Program.Version} - " + LocaleManager.Instance[LocaleKeys.Amiibo];
}
}
public bool IsScanned { get; set; }
public AmiiboApi ScannedAmiibo { get; set; }

View file

@ -78,14 +78,11 @@ 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());
this.GetObservable(IsActiveProperty).Subscribe(IsActiveChanged);
this.ScalingChanged += OnScalingChanged;
}
}
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{

View file

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