mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Chore (Windows): adds comments
This commit is contained in:
@@ -209,7 +209,7 @@ static const char* detectWine(void)
|
||||
static void getSystemReleaseAndVersion(FFPlatformSysinfo* info)
|
||||
{
|
||||
RTL_OSVERSIONINFOW osVersion = { .dwOSVersionInfoSize = sizeof(osVersion) };
|
||||
if (!NT_SUCCESS(RtlGetVersion(&osVersion)))
|
||||
if (!NT_SUCCESS(RtlGetVersion(&osVersion))) // From PEB, not affected by manifest shenanigans
|
||||
return;
|
||||
|
||||
FF_HKEY_AUTO_DESTROY hKey = NULL;
|
||||
@@ -233,7 +233,7 @@ static void getSystemReleaseAndVersion(FFPlatformSysinfo* info)
|
||||
ffStrbufSetF(&info->name, "Wine_%s", wineVersion);
|
||||
else
|
||||
{
|
||||
switch (osVersion.dwPlatformId)
|
||||
switch (osVersion.dwPlatformId) // Hardcoded as WIN32_NT, but just in case
|
||||
{
|
||||
case VER_PLATFORM_WIN32s:
|
||||
ffStrbufSetStatic(&info->name, "WIN32s");
|
||||
|
||||
@@ -18,8 +18,8 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
|
||||
// For cross-platform portability; used by `presets/examples/13.jsonc`
|
||||
if (options->folders.length == 1 && options->folders.chars[0] == '/')
|
||||
{
|
||||
wchar_t path[MAX_PATH + 1];
|
||||
GetSystemWindowsDirectoryW(path, ARRAY_SIZE(path));
|
||||
wchar_t path[16];
|
||||
GetSystemWindowsDirectoryW(path, ARRAY_SIZE(path)); // Loads from KernelBaseGlobalData, very fast
|
||||
options->folders.chars[0] = (char) path[0];
|
||||
ffStrbufAppendS(&options->folders, ":\\");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user