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

View file

@ -29,11 +29,8 @@ 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; }
public AmiiboApi ScannedAmiibo { get; set; } public AmiiboApi ScannedAmiibo { get; set; }

View file

@ -78,14 +78,11 @@ 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 />