Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
977 B

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#include "stdafx.h"
#include "osver.h"
static eOSVersion s_OS = eUninitialized;
void initOSVersion()
{
OSVERSIONINFO versioninfo;
versioninfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if (GetVersionEx(&versioninfo))
{
switch(versioninfo.dwPlatformId)
{
case VER_PLATFORM_WIN32_WINDOWS:
{
s_OS = eWin9x;
break;
}
case VER_PLATFORM_WIN32_NT:
{
s_OS = eWinNT;
break;
}
default:
{
s_OS = eUnknown;
break;
}
}
}
}
eOSVersion getOSVersion()
{
if (s_OS == eUninitialized)
{
initOSVersion();
}
return s_OS;
}