From f5dcf671e8522d67e14401c8aeaf094587ed1714 Mon Sep 17 00:00:00 2001 From: WilliamWsyHK Date: Sun, 29 Dec 2024 00:53:59 +0800 Subject: [PATCH 1/2] Skip processing application for LDN if it does not have control holder --- src/Ryujinx/UI/Windows/MainWindow.axaml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs index da4314e79..95a60dd7c 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs @@ -171,6 +171,11 @@ private void ApplicationLibrary_LdnGameDataReceived(object sender, LdnGameDataRe ViewModel.LdnData.Clear(); foreach (var application in ViewModel.Applications) { + if (!application.HasControlHolder) + { + continue; + } + ref var controlHolder = ref application.ControlHolder.Value; ViewModel.LdnData[application.IdString] = From 36c061453b19849addd1d37bfef4e7efc0b47cba Mon Sep 17 00:00:00 2001 From: WilliamWsyHK Date: Sun, 29 Dec 2024 19:53:09 +0800 Subject: [PATCH 2/2] Address comment from GreemDev --- src/Ryujinx/UI/Windows/MainWindow.axaml.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs index 95a60dd7c..a9cac7f5b 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs @@ -169,13 +169,8 @@ private void ApplicationLibrary_LdnGameDataReceived(object sender, LdnGameDataRe { var ldnGameDataArray = e.LdnData.ToList(); ViewModel.LdnData.Clear(); - foreach (var application in ViewModel.Applications) + foreach (var application in ViewModel.Applications.Where(it => it.HasControlHolder)) { - if (!application.HasControlHolder) - { - continue; - } - ref var controlHolder = ref application.ControlHolder.Value; ViewModel.LdnData[application.IdString] =