Merge branch 'Ryujinx:master' into master

This commit is contained in:
nameoz 2024-02-08 10:38:47 +05:30 committed by GitHub
commit 3a0d70fa0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 3 deletions

View file

@ -36,7 +36,7 @@
<PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies" Version="5.0.1-build13" />
<PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.0" />
<PackageVersion Include="Ryujinx.GtkSharp" Version="3.24.24.59-ryujinx" />
<PackageVersion Include="Ryujinx.SDL2-CS" Version="2.28.1-build28" />
<PackageVersion Include="Ryujinx.SDL2-CS" Version="2.30.0-build32" />
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
<PackageVersion Include="shaderc.net" Version="0.1.0" />
<PackageVersion Include="SharpZipLib" Version="1.4.2" />

View file

@ -336,6 +336,11 @@ namespace Ryujinx.Ava.UI.Helpers
void OverlayOnPositionChanged(object sender, PixelPointEventArgs e)
{
if (_contentDialogOverlayWindow is null)
{
return;
}
_contentDialogOverlayWindow.Position = parent.PointToScreen(new Point());
}

View file

@ -3,6 +3,7 @@ using Ryujinx.Common.SystemInterop;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
using System.Threading;
@ -22,6 +23,9 @@ namespace Ryujinx.Common.Logging
public readonly struct Log
{
private static readonly string _homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
private static readonly string _homeDirRedacted = Path.Combine(Directory.GetParent(_homeDir).FullName, "[redacted]");
internal readonly LogLevel Level;
internal Log(LogLevel level)
@ -100,7 +104,12 @@ namespace Ryujinx.Common.Logging
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static string FormatMessage(LogClass logClass, string caller, string message) => $"{logClass} {caller}: {message}";
private static string FormatMessage(LogClass logClass, string caller, string message)
{
message = message.Replace(_homeDir, _homeDirRedacted);
return $"{logClass} {caller}: {message}";
}
}
public static Log? Debug { get; private set; }

View file

@ -22,6 +22,9 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
private readonly UserId _userId;
#pragma warning restore IDE0052
private byte[] _cachedTokenData;
private DateTime _cachedTokenExpiry;
public ManagerServer(UserId userId)
{
_userId = userId;
@ -144,7 +147,13 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
}
*/
byte[] tokenData = Encoding.ASCII.GetBytes(GenerateIdToken());
if (_cachedTokenData == null || DateTime.UtcNow > _cachedTokenExpiry)
{
_cachedTokenExpiry = DateTime.UtcNow + TimeSpan.FromHours(3);
_cachedTokenData = Encoding.ASCII.GetBytes(GenerateIdToken());
}
byte[] tokenData = _cachedTokenData;
context.Memory.Write(bufferPosition, tokenData);
context.ResponseData.Write(tokenData.Length);