Merge branch ryujinx:master into ui-userprofiles-and-misc

This commit is contained in:
Neo
2025-10-20 06:36:37 -05:00
57 changed files with 409 additions and 442 deletions

View File

@@ -71,8 +71,8 @@ namespace Ryujinx.Ava.Input
{
_size = new Size((int)rect.Width, (int)rect.Height);
}
private void HandleScrollStopped()
private void HandleScrollStopped()
{
Scroll = new Vector2(0, 0);
}
@@ -104,12 +104,18 @@ namespace Ryujinx.Ava.Input
}
private void Parent_PointerPressedEvent(object o, PointerPressedEventArgs args)
{
uint button = (uint)args.GetCurrentPoint(_widget).Properties.PointerUpdateKind;
PointerPoint currentPoint = args.GetCurrentPoint(_widget);
uint button = (uint)currentPoint.Properties.PointerUpdateKind;
if ((uint)PressedButtons.Length > button)
{
PressedButtons[button] = true;
}
if (args.Pointer.Type == PointerType.Touch) // mouse position is unchanged for touch events, set touch position
{
CurrentPosition = new Vector2((float)currentPoint.Position.X, (float)currentPoint.Position.Y);
}
}
private void Parent_PointerMovedEvent(object o, PointerEventArgs args)

View File

@@ -201,8 +201,6 @@ namespace Ryujinx.Ava.Systems
ConfigurationState.Instance.Graphics.AspectRatio.Event += UpdateAspectRatioState;
ConfigurationState.Instance.System.EnableDockedMode.Event += UpdateDockedModeState;
ConfigurationState.Instance.System.AudioVolume.Event += UpdateAudioVolumeState;
ConfigurationState.Instance.System.EnableDockedMode.Event += UpdateDockedModeState;
ConfigurationState.Instance.System.AudioVolume.Event += UpdateAudioVolumeState;
ConfigurationState.Instance.Graphics.AntiAliasing.Event += UpdateAntiAliasing;
ConfigurationState.Instance.Graphics.ScalingFilter.Event += UpdateScalingFilter;
ConfigurationState.Instance.Graphics.ScalingFilterLevel.Event += UpdateScalingFilterLevel;

View File

@@ -848,7 +848,7 @@ namespace Ryujinx.Ava.Systems.AppLibrary
TimeSpan temporary = TimeSpan.Zero;
foreach (var installedApplication in Applications.Items)
foreach (ApplicationData installedApplication in Applications.Items)
{
temporary += LoadAndSaveMetaData(installedApplication.IdString).TimePlayed;
}

View File

@@ -54,7 +54,7 @@ namespace Ryujinx.Ava.Systems
WorkingDirectory = executableDirectory,
};
foreach (var arg in args)
foreach (string arg in args)
{
processStart.ArgumentList.Add(arg);
}

View File

@@ -50,7 +50,7 @@ namespace Ryujinx.Ava.UI.Applet
private string GetWindowsFontByLanguage()
{
var culture = CultureInfo.CurrentUICulture;
CultureInfo culture = CultureInfo.CurrentUICulture;
string langCode = culture.Name;
return culture.TwoLetterISOLanguageName switch

View File

@@ -107,7 +107,7 @@ namespace Ryujinx.Ava.UI.Models
private static async Task<string> GetAllAsyncRequestImpl(HttpClient client = null)
{
var ldnWebHost = ConfigurationState.Instance.Multiplayer.GetLdnWebServer();
string ldnWebHost = ConfigurationState.Instance.Multiplayer.GetLdnWebServer();
LocaleManager.Associate(LocaleKeys.LdnGameListRefreshToolTip, ldnWebHost);

View File

@@ -35,7 +35,7 @@ namespace Ryujinx.Ava.UI.ViewModels
SortApply();
}
var filtered = _visibleEntries;
IEnumerable<LdnGameModel> filtered = _visibleEntries;
if (OnlyShowForOwnedGames)
filtered = filtered.Where(x => _ownedGameTitleIds.ContainsIgnoreCase(x.Title.Id));

View File

@@ -348,7 +348,7 @@ namespace Ryujinx.Ava.UI.ViewModels
{
if (ts.HasValue)
{
var formattedPlayTime = ValueFormatUtils.FormatTimeSpan(ts.Value);
string formattedPlayTime = ValueFormatUtils.FormatTimeSpan(ts.Value);
LocaleManager.Associate(LocaleKeys.GameListLabelTotalTimePlayed, formattedPlayTime);
ShowTotalTimePlayed = formattedPlayTime != string.Empty;
return;
@@ -827,10 +827,10 @@ namespace Ryujinx.Ava.UI.ViewModels
private void RefreshGrid()
{
var appsList = Applications.ToObservableChangeSet()
IObservableList<ApplicationData> appsList = Applications.ToObservableChangeSet()
.Filter(Filter)
.Sort(GetComparer())
.Bind(out var apps)
.Bind(out ReadOnlyObservableCollection<ApplicationData> apps)
.AsObservableList();
AppsObservableList = apps;

View File

@@ -447,9 +447,9 @@ namespace Ryujinx.Ava.UI.ViewModels
_virtualFileSystem = virtualFileSystem;
_contentManager = contentManager;
if (gameIconData != null && gameIconData.Length > 0)
if (gameIconData is { Length: > 0 })
{
using var ms = new MemoryStream(gameIconData);
using MemoryStream ms = new(gameIconData);
_gameIcon = new Bitmap(ms);
}