mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
Icons (Windows): handles the case when users never changes the default settings
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user