Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions vulkanCapsViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
#include <windows.h>
#endif

#ifdef __linux__
#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__APPLE__) && !defined(__linux__)
#define USE_UTSNAME
#include <sys/utsname.h>
#endif

Expand All @@ -82,9 +83,17 @@ OSInfo getOperatingSystem()
{
// QSysInfo works for all supported operating systems
OSInfo osInfo = {};
// GhostBSD - QSysInfo::productType().toStdString() returs "unknown"
#ifndef USE_UTSNAME
osInfo.name = QSysInfo::productType().toStdString();
osInfo.architecture = QSysInfo::buildCpuArchitecture().toStdString();
osInfo.version = QSysInfo::productVersion().toStdString();
#else
struct utsname n;
uname(&n);
osInfo.name = n.sysname;
osInfo.version = n.version;
#endif
osInfo.architecture = QSysInfo::buildCpuArchitecture().toStdString();
// The Qt version used does not detect Windows 11, so we use Win32 API to detect it via the build version
#if defined(_WIN32)
HMODULE hModule = LoadLibrary(TEXT("ntdll.dll"));
Expand Down