diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs index 5305a3f72..e5f6460ac 100644 --- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs @@ -74,42 +74,12 @@ namespace Ryujinx.Ava.UI.ViewModels private Bitmap _gameIcon; private string _gameTitle; private string _gameId; - public Bitmap GameIcon - { - get => _gameIcon; - set - { - if (_gameIcon != value) - { - _gameIcon = value; - } - } - } - - public string GameTitle - { - get => _gameTitle; - set - { - if (_gameTitle != value) - { - _gameTitle = value; - } - } - } - - public string GameId - { - get => _gameId; - set - { - if (_gameId != value) - { - _gameId = value; - } - } - } + private readonly bool _isGameRunning; + public bool IsGameRunning => _isGameRunning; + public Bitmap GameIcon => _gameIcon; + public string GameTitle => _gameTitle; + public string GameId => _gameId; public int ResolutionScale { @@ -385,8 +355,10 @@ namespace Ryujinx.Ava.UI.ViewModels } } - public SettingsViewModel(VirtualFileSystem virtualFileSystem, + public SettingsViewModel( + VirtualFileSystem virtualFileSystem, ContentManager contentManager, + bool gameRunning, string gamePath, string gameName, string gameId, @@ -400,12 +372,13 @@ namespace Ryujinx.Ava.UI.ViewModels { using (var ms = new MemoryStream(gameIconData)) { - GameIcon = new Bitmap(ms); + _gameIcon = new Bitmap(ms); } } - GameTitle = gameName; - GameId = gameId; + _isGameRunning = gameRunning; + _gameTitle = gameName; + _gameId = gameId; if (enableToLoadCustomConfig) // During the game. If there is no user config, then load the global config window { diff --git a/src/Ryujinx/UI/Windows/UserConfigWindows.axaml b/src/Ryujinx/UI/Windows/UserConfigWindows.axaml index ed3ab66f8..3a9f3cff8 100644 --- a/src/Ryujinx/UI/Windows/UserConfigWindows.axaml +++ b/src/Ryujinx/UI/Windows/UserConfigWindows.axaml @@ -136,6 +136,11 @@ Content="{ext:Locale SettingsButtonClose}" Command="{Binding CancelButton}" />