mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-10 17:14:25 +00:00
misc: chore: use new array in LdnGameDataReceivedEventArgs instead of collecting the ldn datas into a list
This commit is contained in:
parent
6c6580ddcc
commit
2a84656ffc
@ -189,17 +189,12 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(() =>
|
Dispatcher.UIThread.Post(() =>
|
||||||
{
|
{
|
||||||
List<LdnGameData> ldnGameDataArray = e.LdnData.ToList();
|
|
||||||
ViewModel.LdnData.Clear();
|
ViewModel.LdnData.Clear();
|
||||||
foreach (ApplicationData application in ViewModel.Applications.Where(it => it.HasControlHolder))
|
foreach (ApplicationData application in ViewModel.Applications.Where(it => it.HasControlHolder))
|
||||||
{
|
{
|
||||||
ref ApplicationControlProperty controlHolder = ref application.ControlHolder.Value;
|
ref ApplicationControlProperty controlHolder = ref application.ControlHolder.Value;
|
||||||
|
|
||||||
ViewModel.LdnData[application.IdString] =
|
ViewModel.LdnData[application.IdString] = e.LdnData.Where(ref controlHolder);
|
||||||
LdnGameData.GetArrayForApp(
|
|
||||||
ldnGameDataArray,
|
|
||||||
ref controlHolder
|
|
||||||
);
|
|
||||||
|
|
||||||
UpdateApplicationWithLdnData(application);
|
UpdateApplicationWithLdnData(application);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
|||||||
public IEnumerable<string> Players { get; set; }
|
public IEnumerable<string> Players { get; set; }
|
||||||
|
|
||||||
public static Array GetArrayForApp(
|
public static Array GetArrayForApp(
|
||||||
IEnumerable<LdnGameData> receivedData, ref ApplicationControlProperty acp)
|
LdnGameData[] receivedData, ref ApplicationControlProperty acp)
|
||||||
{
|
{
|
||||||
LibHac.Common.FixedArrays.Array8<ulong> communicationId = acp.LocalCommunicationId;
|
LibHac.Common.FixedArrays.Array8<ulong> communicationId = acp.LocalCommunicationId;
|
||||||
|
|
||||||
@ -40,4 +40,10 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
|||||||
public int GameCount => _ldnDatas.Length;
|
public int GameCount => _ldnDatas.Length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class LdnGameDataHelper
|
||||||
|
{
|
||||||
|
public static LdnGameData.Array Where(this LdnGameData[] unfilteredDatas, ref ApplicationControlProperty acp)
|
||||||
|
=> LdnGameData.GetArrayForApp(unfilteredDatas, ref acp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user