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}" />
+
diff --git a/src/Ryujinx/UI/Windows/UserConfigWindows.axaml.cs b/src/Ryujinx/UI/Windows/UserConfigWindows.axaml.cs
index 6fd35825a..4247c1cfb 100644
--- a/src/Ryujinx/UI/Windows/UserConfigWindows.axaml.cs
+++ b/src/Ryujinx/UI/Windows/UserConfigWindows.axaml.cs
@@ -35,6 +35,7 @@ namespace Ryujinx.Ava.UI.Windows
DataContext = ViewModel = new SettingsViewModel(
viewModel.VirtualFileSystem,
viewModel.ContentManager,
+ viewModel.IsGameRunning,
viewModel.SelectedApplication.Path,
viewModel.SelectedApplication.Name,
viewModel.SelectedApplication.IdString,
@@ -46,7 +47,7 @@ namespace Ryujinx.Ava.UI.Windows
InitializeComponent();
Load();
-
+
#if DEBUG
this.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Alt));
#endif