Skip to content

Commit 246d03f

Browse files
authoredAug 5, 2021
Log file now shows Windows version (dkfans#1114)
1 parent f5e8546 commit 246d03f

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed
 

‎keeperfx.exe.manifest

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

33
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
4-
4+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
5+
<application>
6+
<!-- Windows 10 -->
7+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
8+
<!-- Windows 8.1 -->
9+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
10+
<!-- Windows 8 -->
11+
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
12+
<!-- Windows 7 -->
13+
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
14+
<!-- Windows Vista -->
15+
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
16+
</application>
17+
</compatibility>
518
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
619
<security>
720
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">

‎src/main.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ short setup_game(void)
903903
{
904904
struct CPU_INFO cpu_info; // CPU status variable
905905
short result;
906-
906+
OSVERSIONINFO v;
907907
// Do only a very basic setup
908908
cpu_detect(&cpu_info);
909909
SYNCMSG("CPU %s type %d family %d model %d stepping %d features %08x",cpu_info.vendor,
@@ -912,6 +912,11 @@ short setup_game(void)
912912
if (cpu_info.BrandString)
913913
{
914914
SYNCMSG("%s", &cpu_info.brand[0]);
915+
}
916+
v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
917+
if (GetVersionEx(&v))
918+
{
919+
SYNCMSG("Operating System: %s %ld.%ld.%ld", (v.dwPlatformId == VER_PLATFORM_WIN32_NT) ? "Windows NT" : "Windows", v.dwMajorVersion,v.dwMinorVersion,v.dwBuildNumber);
915920
}
916921
update_memory_constraits();
917922
// Enable features that require more resources

0 commit comments

Comments
 (0)
Please sign in to comment.