mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add GPU model info on startup
Kept in for dedicated as the main executable imports the same DLL used for 'EnumDisplayDevices'. No GPU will be displayed if there is none installed or set as primary.
This commit is contained in:
parent
3f4884b20a
commit
81adf428ff
@ -40,7 +40,6 @@ void SDK_Init()
|
||||
Console_Init();
|
||||
#endif // !DEDICATED
|
||||
SpdLog_Init();
|
||||
spdlog::info("\n");
|
||||
for (size_t i = 0; i < SDK_ARRAYSIZE(R5R_EMBLEM); i++)
|
||||
{
|
||||
std::string svEscaped = StringEscape(R5R_EMBLEM[i]);
|
||||
|
@ -418,10 +418,27 @@ void WinSock_Shutdown()
|
||||
}
|
||||
void QuerySystemInfo()
|
||||
{
|
||||
for (int i = 0; ; i++)
|
||||
{
|
||||
DISPLAY_DEVICE dd = { sizeof(dd), 0 };
|
||||
BOOL f = EnumDisplayDevices(NULL, i, &dd, EDD_GET_DEVICE_INTERFACE_NAME);
|
||||
if (!f)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) // Only log the primary device.
|
||||
{
|
||||
char szDeviceName[128];
|
||||
wcstombs(szDeviceName, dd.DeviceString, sizeof(szDeviceName));
|
||||
spdlog::info("GPU model identifier : '{:s}'\n", szDeviceName);
|
||||
}
|
||||
}
|
||||
|
||||
const CPUInformation& pi = GetCPUInformation();
|
||||
|
||||
spdlog::info("CPU model identifier : '{:s}'\n", pi.m_szProcessorBrand);
|
||||
spdlog::info("CPU vendor identifier : '{:s}'\n", pi.m_szProcessorID);
|
||||
spdlog::info("CPU vendor tag : '{:s}'\n", pi.m_szProcessorID);
|
||||
spdlog::info("CPU core count : '{:12d}' ({:s})\n", pi.m_nPhysicalProcessors, "Physical");
|
||||
spdlog::info("CPU core count : '{:12d}' ({:s})\n", pi.m_nLogicalProcessors, "Logical");
|
||||
spdlog::info("L1 cache (KiB): '{:12d}'\n", pi.m_nL1CacheSizeKb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user