diff --git a/src/Ryujinx.Gtk3/Program.cs b/src/Ryujinx.Gtk3/Program.cs index 3329485373..03b176e0f0 100644 --- a/src/Ryujinx.Gtk3/Program.cs +++ b/src/Ryujinx.Gtk3/Program.cs @@ -324,7 +324,7 @@ namespace Ryujinx { mainWindow.ShowProfilesSelector(); } - + if (CommandLineState.LaunchPathArg != null) { mainWindow.RunApplication(CommandLineState.LaunchPathArg, CommandLineState.StartFullscreenArg); diff --git a/src/Ryujinx.Gtk3/UI/Windows/UserProfilesSelectorWindow.cs b/src/Ryujinx.Gtk3/UI/Windows/UserProfilesSelectorWindow.cs index 083658e962..048ab04ade 100644 --- a/src/Ryujinx.Gtk3/UI/Windows/UserProfilesSelectorWindow.cs +++ b/src/Ryujinx.Gtk3/UI/Windows/UserProfilesSelectorWindow.cs @@ -106,11 +106,11 @@ namespace Ryujinx.UI.Windows string userName = _tableStore.GetValue(selectedIter, 2).ToString().Split("\n")[0]; string userId = _tableStore.GetValue(selectedIter, 2).ToString().Split("\n")[1]; - + // Open the selected one. _accountManager.OpenUser(new UserId(userId)); - + Close(); } diff --git a/src/Ryujinx/UI/ViewModels/ProfilesViewModel.cs b/src/Ryujinx/UI/ViewModels/ProfilesViewModel.cs index 070d4eb7d7..a2093cf5a0 100644 --- a/src/Ryujinx/UI/ViewModels/ProfilesViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/ProfilesViewModel.cs @@ -10,28 +10,28 @@ namespace Ryujinx.Ava.UI.ViewModels { private UserProfile _selectedProfile; - + public event Action CloseWindow; public event Action ApplyProfile; public ProfilesViewModel() { Profiles = new AvaloniaList(); - Profiles.Clear(); + Profiles.Clear(); } - + public ProfilesViewModel(IEnumerable profiles) { Profiles = new AvaloniaList(); - Profiles.Clear(); + Profiles.Clear(); Profiles.AddRange(profiles); } public AvaloniaList Profiles { - get; set; + get; set; } - + public UserProfile SelectedProfile { get => _selectedProfile; @@ -40,13 +40,13 @@ namespace Ryujinx.Ava.UI.ViewModels _selectedProfile = value; OnPropertyChanged(); } - } + } public void Close() { CloseWindow?.Invoke(); GC.SuppressFinalize(this); } - + } } diff --git a/src/Ryujinx/UI/Views/User/UserSimpleSelectorView.axaml.cs b/src/Ryujinx/UI/Views/User/UserSimpleSelectorView.axaml.cs index 2c5810fbda..215c253d06 100644 --- a/src/Ryujinx/UI/Views/User/UserSimpleSelectorView.axaml.cs +++ b/src/Ryujinx/UI/Views/User/UserSimpleSelectorView.axaml.cs @@ -26,9 +26,9 @@ namespace Ryujinx.Ava.UI.Views.User ViewModel = new ProfilesViewModel(); var profiles = _accountManager .GetAllUsers() - .Select(p => new Models.UserProfile(p,null)) - .OrderBy(p => p.Name); - + .Select(p => new Models.UserProfile(p, null)) + .OrderBy(p => p.Name); + ViewModel.Profiles.AddRange(profiles); InitializeComponent(); } @@ -67,7 +67,7 @@ namespace Ryujinx.Ava.UI.Views.User { if (ViewModel.Profiles[selectedIndex] is UserProfile userProfile) { - _accountManager?.OpenUser(userProfile.UserId); + _accountManager?.OpenUser(userProfile.UserId); foreach (BaseModel profile in ViewModel.Profiles) { diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs index 9ff71f18db..85cd78641a 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs @@ -309,7 +309,7 @@ namespace Ryujinx.Ava.UI.Windows DataContext = content.ViewModel, Content = content, Padding = new Thickness(0), - }; + }; content.ViewModel.CloseWindow += contentDialog.Hide; Style footer = new(x => x.Name("DialogSpace").Child().OfType()); footer.Setters.Add(new Setter(IsVisibleProperty, false)); @@ -317,7 +317,7 @@ namespace Ryujinx.Ava.UI.Windows contentDialog.Styles.Add(footer); await contentDialog.ShowAsync(); - }); + }); } private async Task CheckLaunchState()