mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 03:02:00 +00:00
misc: Use a few static helpers for Avalonia objects
This commit is contained in:
parent
0cd09ea0c5
commit
e43d899e1d
4 changed files with 4 additions and 15 deletions
|
@ -93,10 +93,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
_applicationData = applicationData;
|
_applicationData = applicationData;
|
||||||
|
|
||||||
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
_storageProvider = RyujinxApp.MainWindow.StorageProvider;
|
||||||
{
|
|
||||||
_storageProvider = desktop.MainWindow.StorageProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadDownloadableContents();
|
LoadDownloadableContents();
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,9 +245,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
{
|
{
|
||||||
if (Program.PreviewerDetached)
|
if (Program.PreviewerDetached)
|
||||||
{
|
{
|
||||||
_mainWindow =
|
_mainWindow = RyujinxApp.MainWindow;
|
||||||
(MainWindow)((IClassicDesktopStyleApplicationLifetime)Application.Current
|
|
||||||
.ApplicationLifetime).MainWindow;
|
|
||||||
|
|
||||||
AvaloniaKeyboardDriver = new AvaloniaKeyboardDriver(owner);
|
AvaloniaKeyboardDriver = new AvaloniaKeyboardDriver(owner);
|
||||||
|
|
||||||
|
|
|
@ -86,10 +86,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
_modJsonPath = Path.Combine(AppDataManager.GamesDirPath, applicationId.ToString("x16"), "mods.json");
|
_modJsonPath = Path.Combine(AppDataManager.GamesDirPath, applicationId.ToString("x16"), "mods.json");
|
||||||
|
|
||||||
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
_storageProvider = RyujinxApp.MainWindow.StorageProvider;
|
||||||
{
|
|
||||||
_storageProvider = desktop.MainWindow.StorageProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadMods(applicationId);
|
LoadMods(applicationId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,10 +76,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
|
||||||
ApplicationData = applicationData;
|
ApplicationData = applicationData;
|
||||||
|
|
||||||
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
StorageProvider = RyujinxApp.MainWindow.StorageProvider;
|
||||||
{
|
|
||||||
StorageProvider = desktop.MainWindow.StorageProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadUpdates();
|
LoadUpdates();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue