mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 15:51:59 +00:00
UI: chore: remove direct static MainWindowViewModel reference
This commit is contained in:
parent
1bc0159139
commit
c69881a0a2
3 changed files with 4 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
using Gommon;
|
||||||
using LibHac.Fs;
|
using LibHac.Fs;
|
||||||
using LibHac.Ncm;
|
using LibHac.Ncm;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
|
@ -47,7 +48,7 @@ namespace Ryujinx.Ava.UI.Models
|
||||||
TitleId = info.ProgramId;
|
TitleId = info.ProgramId;
|
||||||
UserId = info.UserId;
|
UserId = info.UserId;
|
||||||
|
|
||||||
var appData = MainWindow.MainWindowViewModel.Applications.FirstOrDefault(x => x.IdString.Equals(TitleIdString, StringComparison.OrdinalIgnoreCase));
|
var appData = RyujinxApp.MainWindow.ViewModel.Applications.FirstOrDefault(x => x.IdString.EqualsIgnoreCase(TitleIdString));
|
||||||
|
|
||||||
InGameList = appData != null;
|
InGameList = appData != null;
|
||||||
|
|
||||||
|
|
|
@ -750,7 +750,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
||||||
|
|
||||||
MainWindow.UpdateGraphicsConfig();
|
MainWindow.UpdateGraphicsConfig();
|
||||||
MainWindow.MainWindowViewModel.VSyncModeSettingChanged();
|
RyujinxApp.MainWindow.ViewModel.VSyncModeSettingChanged();
|
||||||
|
|
||||||
SaveSettingsEvent?.Invoke();
|
SaveSettingsEvent?.Invoke();
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
{
|
{
|
||||||
public partial class MainWindow : StyleableAppWindow
|
public partial class MainWindow : StyleableAppWindow
|
||||||
{
|
{
|
||||||
internal static MainWindowViewModel MainWindowViewModel { get; private set; }
|
|
||||||
|
|
||||||
public MainWindowViewModel ViewModel { get; }
|
public MainWindowViewModel ViewModel { get; }
|
||||||
|
|
||||||
internal readonly AvaHostUIHandler UiHandler;
|
internal readonly AvaHostUIHandler UiHandler;
|
||||||
|
@ -76,7 +74,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
DataContext = ViewModel = MainWindowViewModel = new MainWindowViewModel
|
DataContext = ViewModel = new MainWindowViewModel
|
||||||
{
|
{
|
||||||
Window = this
|
Window = this
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue