mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
some more tweaks to logs
This commit is contained in:
parent
cd3a52363b
commit
c479cc20a5
59
src/debug.c
59
src/debug.c
@ -207,11 +207,11 @@ void dbg_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
TRACE(
|
TRACE(
|
||||||
"cnc-ddraw version = %d.%d.%d.%d (git~%s, %s)\n",
|
"cnc-ddraw version = %d.%d.%d.%d (git~%s, %s)\n",
|
||||||
VERSION_MAJOR,
|
VERSION_MAJOR,
|
||||||
VERSION_MINOR,
|
VERSION_MINOR,
|
||||||
VERSION_BUILD,
|
VERSION_BUILD,
|
||||||
VERSION_REVISION,
|
VERSION_REVISION,
|
||||||
GIT_COMMIT,
|
GIT_COMMIT,
|
||||||
GIT_BRANCH);
|
GIT_BRANCH);
|
||||||
|
|
||||||
@ -225,34 +225,35 @@ void dbg_init()
|
|||||||
LONG status9x =
|
LONG status9x =
|
||||||
RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion", 0L, KEY_READ, &hkey9x);
|
RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion", 0L, KEY_READ, &hkey9x);
|
||||||
|
|
||||||
if (status == ERROR_SUCCESS)
|
char name[256] = { 0 };
|
||||||
|
DWORD name_size = sizeof(name);
|
||||||
|
if (status || RegQueryValueExA(hkey, "ProductName", NULL, NULL, (PVOID)&name, &name_size) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
char name[256] = { 0 };
|
if (status9x == ERROR_SUCCESS)
|
||||||
DWORD name_size = sizeof(name);
|
|
||||||
if (RegQueryValueExA(hkey, "ProductName", NULL, NULL, (PVOID)&name, &name_size) != ERROR_SUCCESS && hkey9x)
|
|
||||||
{
|
|
||||||
RegQueryValueExA(hkey9x, "ProductName", NULL, NULL, (PVOID)&name, &name_size);
|
RegQueryValueExA(hkey9x, "ProductName", NULL, NULL, (PVOID)&name, &name_size);
|
||||||
}
|
|
||||||
|
|
||||||
char vers[256] = { 0 };
|
|
||||||
DWORD vers_size = sizeof(vers);
|
|
||||||
if (RegQueryValueExA(hkey, "DisplayVersion", NULL, NULL, (PVOID)&vers, &vers_size) != ERROR_SUCCESS && hkey9x)
|
|
||||||
{
|
|
||||||
RegQueryValueExA(hkey9x, "VersionNumber", NULL, NULL, (PVOID)&vers, &vers_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
char build[256] = { 0 };
|
|
||||||
DWORD build_size = sizeof(build);
|
|
||||||
if (RegQueryValueExA(hkey, "BuildLabEx", NULL, NULL, (PVOID)&build, &build_size) != ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
RegQueryValueExA(hkey, "BuildLab", NULL, NULL, (PVOID)&build, &build_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE("%s %s (%s)\n", name, vers, build);
|
|
||||||
|
|
||||||
RegCloseKey(hkey);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char vers[256] = { 0 };
|
||||||
|
DWORD vers_size = sizeof(vers);
|
||||||
|
if (status || RegQueryValueExA(hkey, "DisplayVersion", NULL, NULL, (PVOID)&vers, &vers_size) != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
if (status9x == ERROR_SUCCESS)
|
||||||
|
RegQueryValueExA(hkey9x, "VersionNumber", NULL, NULL, (PVOID)&vers, &vers_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
char build[256] = { 0 };
|
||||||
|
DWORD build_size = sizeof(build);
|
||||||
|
if (status || RegQueryValueExA(hkey, "BuildLabEx", NULL, NULL, (PVOID)&build, &build_size) != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
if (status == ERROR_SUCCESS)
|
||||||
|
RegQueryValueExA(hkey, "BuildLab", NULL, NULL, (PVOID)&build, &build_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
TRACE("%s %s (%s)\n", name, vers, build);
|
||||||
|
|
||||||
|
if (status == ERROR_SUCCESS)
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
if (status9x == ERROR_SUCCESS)
|
if (status9x == ERROR_SUCCESS)
|
||||||
RegCloseKey(hkey9x);
|
RegCloseKey(hkey9x);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user