master ohmu/fastfetch-openbsd / src / detection / lm / lm_windows.c
ohmu  ·  2026-10-15
 1#include "lm.h"
 2
 3#include "common/windows/version.h"
 4#include "common/windows/nt.h"
 5
 6#include <wchar.h>
 7
 8const char* ffDetectLM(FFLMResult* result) {
 9    ffStrbufSetStatic(&result->service, "LogonUI");
10    ffStrbufSetStatic(&result->prettyName, "Logon User Interface");
11
12    if (instance.config.general.detectVersion) {
13        wchar_t exePath[MAX_PATH];
14        _snwprintf(exePath, ARRAY_SIZE(exePath), L"%ls\\system32\\%ls", (const wchar_t*) SharedUserData->NtSystemRoot, L"LogonUI.exe");
15        ffGetFileVersion(exePath, nullptr, &result->version);
16    }
17
18    return nullptr;
19}