mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-31 10:02:49 +01:00
CPU: detect base frequency
This commit is contained in:
@@ -154,3 +154,17 @@ bool ffRegGetSubKey(HKEY hKey, uint32_t index, FFstrbuf* result, FFstrbuf* error
|
||||
ffStrbufSetWS(result, resultW);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ffRegGetNSubKeys(HKEY hKey, uint32_t* result, FFstrbuf* error)
|
||||
{
|
||||
DWORD buffer;
|
||||
if(RegQueryInfoKeyW(hKey, NULL, NULL, NULL, &buffer, NULL, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
if (error)
|
||||
ffStrbufAppendS(error, "RegQueryInfoKeyW(hKey) failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
*result = buffer;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -21,5 +21,6 @@ bool ffRegReadData(HKEY hKey, const wchar_t* valueNameW, uint8_t** result, uint3
|
||||
bool ffRegReadUint(HKEY hKey, const wchar_t* valueNameW, uint32_t* result, FFstrbuf* error);
|
||||
bool ffRegReadUint64(HKEY hKey, const wchar_t* valueNameW, uint64_t* result, FFstrbuf* error);
|
||||
bool ffRegGetSubKey(HKEY hKey, uint32_t index, FFstrbuf* result, FFstrbuf* error);
|
||||
bool ffRegGetNSubKeys(HKEY hKey, uint32_t* result, FFstrbuf* error);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user