From 67b7a270449106d9c236ecc88489527468fddc22 Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Sat, 21 Oct 2023 17:00:46 +0700 Subject: [PATCH] Start10: Attempt to fix exploding RAM usage when opening Start10 on 22621.2134+ --- ExplorerPatcher/StartMenuSettings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ExplorerPatcher/StartMenuSettings.cpp b/ExplorerPatcher/StartMenuSettings.cpp index b0866a8f8..94cda734c 100644 --- a/ExplorerPatcher/StartMenuSettings.cpp +++ b/ExplorerPatcher/StartMenuSettings.cpp @@ -26,7 +26,7 @@ static std::vector GlobalStartData_GetPlacesFromRegistry() std::vector places; DWORD dwSize; - HRESULT hr = RegGetValueW( + LSTATUS lRes = RegGetValueW( HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start", L"VisiblePlaces", @@ -35,11 +35,11 @@ static std::vector GlobalStartData_GetPlacesFromRegistry() nullptr, &dwSize ); - if (FAILED(hr) || dwSize == 0) + if (lRes != ERROR_SUCCESS || dwSize == 0) return places; places.resize(dwSize / sizeof(winrt::guid)); - hr = RegGetValueW( + lRes = RegGetValueW( HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Start", L"VisiblePlaces", @@ -48,7 +48,7 @@ static std::vector GlobalStartData_GetPlacesFromRegistry() places.data(), &dwSize ); - if (FAILED(hr)) + if (lRes != ERROR_SUCCESS) places.clear(); return places;