MCPcopy Create free account
hub / github.com/JHRobotics/softgpu / softgpu_sysinfo

Function softgpu_sysinfo

softgpu.c:303–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303void softgpu_sysinfo()
304{
305 version_win(&sysver);
306 isNT = version_is_nt();
307
308 static char buf[50];
309
310 readCPUInfo();
311
312 if(registryRead("HKLM\\SOFTWARE\\Microsoft\\DirectX\\Version", buf, 50))
313 {
314 version_parse(buf, &dxver);
315 }
316
317 if(version_compare(&sysver, &WINVER98) >= 0 && hasP2)
318 {
319 version_parse(iniValue("[softgpu]", "dx9target"), &dxtarget);
320 }
321 else
322 {
323 version_parse(iniValue("[softgpu]", "dx8target"), &dxtarget);
324 }
325
326 HMODULE testLib = LoadLibraryA("msvcrt.dll");
327 if(testLib != NULL)
328 {
329 hasCRT = TRUE;
330 FreeLibrary(testLib);
331 }
332
333 testLib = LoadLibraryA("opengl32.dll");
334 if(testLib != NULL)
335 {
336 hasOpengl = TRUE;
337 FreeLibrary(testLib);
338 }
339
340 /* ole32 is usually present, but for example "comcat.dll" not */
341 testLib = LoadLibraryA("comcat.dll");
342 if(testLib != NULL)
343 {
344 hasOle32 = TRUE;
345 FreeLibrary(testLib);
346 }
347
348 testLib = LoadLibraryA("ws2_32.dll");
349 if(testLib != NULL)
350 {
351 hasWS2 = TRUE;
352 FreeLibrary(testLib);
353 }
354
355 reinstall_dx = checkDXReinstall();
356
357 sprintf(sysinfomsg,
358 "System version: %d.%d.%d.%d\n"
359 "Core type: %s\n"
360 "DX version: %d.%d.%d.%d\n"

Callers 1

mainFunction · 0.85

Calls 8

version_winFunction · 0.85
version_is_ntFunction · 0.85
readCPUInfoFunction · 0.85
registryReadFunction · 0.85
version_parseFunction · 0.85
version_compareFunction · 0.85
iniValueFunction · 0.85
checkDXReinstallFunction · 0.85

Tested by

no test coverage detected