Skip to content

Commit c82df82

Browse files
committed
refact: 删掉没用的循环 (没什么软件长度会大于 260 罢
1 parent 04120e8 commit c82df82

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

CurvaLauncher.Plugins.RunApplication/RunApplicationPlugin.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,8 @@ private IEnumerable<UwpAppInfo> GetUwpApps(RegistryKey subKey)
332332
resourcePath = $"//{id}/{resourcePath}";
333333
}
334334

335-
uint errCode;
336335
string resourceStr = $"@{{{packageId}?ms-resource:{resourcePath}}}";
337-
do
338-
{
339-
errCode = SHLoadIndirectString(resourceStr, ref displayNameBuffer[0], displayNameBuffer.Length, 0);
340-
}
341-
while (errCode == 1 || errCode == 0x8007007a);
336+
uint errCode =SHLoadIndirectString(resourceStr, ref displayNameBuffer[0], displayNameBuffer.Length, 0);
342337

343338
int endIndex = Array.IndexOf(displayNameBuffer, '\0');
344339
displayName = new string(displayNameBuffer, 0, endIndex);

0 commit comments

Comments
 (0)