Icons (Windows): handles the case when users never changes the default settings

This commit is contained in:
李通洲
2026-03-22 20:21:11 +08:00
parent 4fb7860a8e
commit ff8d4b46ef
+5 -1
View File
@@ -6,7 +6,11 @@ const char* ffDetectIcons(FFIconsResult* result)
FF_AUTO_CLOSE_FD HANDLE hKey = NULL;
if(!ffRegOpenKeyForRead(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\NewStartPanel", &hKey, NULL) &&
!ffRegOpenKeyForRead(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\ClassicStartMenu", &hKey, NULL))
return "ffRegOpenKeyForRead(Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\{NewStartPanel|ClassicStartMenu}) failed";
{
// If the key doesn't exist, it means that the user never changed the default settings.
ffStrbufSetStatic(&result->icons2, "Recycle Bin");
return NULL;
}
// Whether these icons are hidden
uint32_t ThisPC = 1, UsersFiles = 1, RemoteNetwork = 1, RecycleBin = 0 /* Shown by default */, ControlPanel = 1;