mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-05-20 07:27:28 +01:00
Compare commits
5 commits
82bc4dffa1
...
d1165cfb0e
Author | SHA1 | Date | |
---|---|---|---|
d1165cfb0e | |||
a23d8cb92f | |||
0ab2c80575 | |||
46ebdcfe03 | |||
ba9e0ca6dc |
|
@ -857,8 +857,14 @@ namespace ARMeilleure.Translation.PTC
|
|||
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
|
||||
threads.ForEach((thread) => thread.Start());
|
||||
threads.ForEach((thread) => thread.Join());
|
||||
foreach (var thread in threads)
|
||||
{
|
||||
thread.Start();
|
||||
}
|
||||
foreach (var thread in threads)
|
||||
{
|
||||
thread.Join();
|
||||
}
|
||||
|
||||
threads.Clear();
|
||||
|
||||
|
|
|
@ -395,8 +395,14 @@ namespace Ryujinx.Graphics.Gpu
|
|||
{
|
||||
Renderer.CreateSync(SyncNumber, strict);
|
||||
|
||||
SyncActions.ForEach(action => action.SyncPreAction(syncpoint));
|
||||
SyncpointActions.ForEach(action => action.SyncPreAction(syncpoint));
|
||||
foreach (var action in SyncActions)
|
||||
{
|
||||
action.SyncPreAction(syncpoint);
|
||||
}
|
||||
foreach (var action in SyncpointActions)
|
||||
{
|
||||
action.SyncPreAction(syncpoint);
|
||||
}
|
||||
|
||||
SyncNumber++;
|
||||
|
||||
|
|
|
@ -37,13 +37,16 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
|||
|
||||
_accountSaveDataManager = new AccountSaveDataManager(_profiles);
|
||||
|
||||
if (!_profiles.TryGetValue(DefaultUserId.ToString(), out _))
|
||||
if (_profiles.IsEmpty)
|
||||
{
|
||||
byte[] defaultUserImage = EmbeddedResources.Read("Ryujinx.HLE/HOS/Services/Account/Acc/DefaultUserImage.jpg");
|
||||
|
||||
AddUser("RyuPlayer", defaultUserImage, DefaultUserId);
|
||||
// Use a random UserId as default to avoid issues in multiplayer per #3396.
|
||||
UserId userId = new UserId(Guid.NewGuid().ToString().Replace("-", ""));
|
||||
|
||||
OpenUser(DefaultUserId);
|
||||
AddUser("RyuPlayer", defaultUserImage, userId);
|
||||
|
||||
OpenUser(userId);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -184,7 +187,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
|||
|
||||
_profiles.Remove(userId.ToString(), out _);
|
||||
|
||||
OpenUser(DefaultUserId);
|
||||
OpenUser(new UserId(_profiles.First().Key));
|
||||
|
||||
_accountSaveDataManager.Save(_profiles);
|
||||
}
|
||||
|
|
|
@ -123,6 +123,13 @@ namespace Ryujinx.Ava
|
|||
}
|
||||
}
|
||||
|
||||
// Check if we've made any profiles yet
|
||||
if (!File.Exists(Path.Combine(AppDataManager.BaseDirPath, "system", "Profiles.json")))
|
||||
{
|
||||
MainWindow.ShowNewUserEditPrompt = true;
|
||||
}
|
||||
|
||||
|
||||
if (CommandLineState.LaunchPathArg != null)
|
||||
{
|
||||
MainWindow.DeferLoadApplication(CommandLineState.LaunchPathArg, CommandLineState.StartFullscreenArg);
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Interactivity;
|
||||
using FluentAvalonia.Core;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using FluentAvalonia.UI.Navigation;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Controls;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.Models;
|
||||
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||
using System;
|
||||
using UserProfile = Ryujinx.Ava.UI.Models.UserProfile;
|
||||
|
||||
|
@ -21,7 +21,9 @@ namespace Ryujinx.Ava.UI.Views.User
|
|||
|
||||
public TempProfile TempProfile { get; set; }
|
||||
public static uint MaxProfileNameLength => 0x20;
|
||||
public bool IsDeletable => _profile.UserId != AccountManager.DefaultUserId;
|
||||
|
||||
// Don't allow deletion if there is only one user
|
||||
public bool IsDeletable => _parent.AccountManager.GetAllUsers().Count() != 1;
|
||||
|
||||
public UserEditorView()
|
||||
{
|
||||
|
|
|
@ -54,6 +54,8 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
public SettingsWindow SettingsWindow { get; set; }
|
||||
|
||||
public static bool ShowKeyErrorOnLoad { get; set; }
|
||||
|
||||
public static bool ShowNewUserEditPrompt { get; set; }
|
||||
public ApplicationLibrary ApplicationLibrary { get; set; }
|
||||
|
||||
public readonly double StatusBarHeight;
|
||||
|
@ -300,6 +302,20 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
await Dispatcher.UIThread.InvokeAsync(async () => await UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys));
|
||||
}
|
||||
|
||||
if (ShowNewUserEditPrompt)
|
||||
{
|
||||
ShowNewUserEditPrompt = false;
|
||||
|
||||
await Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
UserResult result = await ContentDialogHelper.CreateInfoDialog("The default profile has been created.", "Would you like to manage profiles now?", "Yes", "No", "First Launch");
|
||||
if (result == UserResult.Ok)
|
||||
{
|
||||
await ViewModel.ManageProfiles();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.CheckUpdatesOnStart.Value && Updater.CanUpdate(false))
|
||||
{
|
||||
await Updater.BeginParse(this, false).ContinueWith(task =>
|
||||
|
|
Loading…
Reference in a new issue