mirror of https://github.com/odrling/Aegisub
Switch back to GetVersionEx() to avoid depending on the win8 SDK just for VersionHelpers.h
This commit is contained in:
parent
2720d8c0dc
commit
43f5af556d
|
@ -30,13 +30,19 @@ namespace bfs = boost::filesystem;
|
|||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include <versionhelpers.h>
|
||||
|
||||
#undef CreateDirectory
|
||||
|
||||
namespace {
|
||||
FINDEX_INFO_LEVELS find_info_level() {
|
||||
return IsWindows7OrGreater() ? FindExInfoBasic : FindExInfoStandard;
|
||||
OSVERSIONINFO osvi = {};
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
GetVersionEx(&osvi);
|
||||
|
||||
if (osvi.dwMajorVersion > 6 || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion >= 1))
|
||||
return FindExInfoBasic;
|
||||
else
|
||||
return FindExInfoStandard;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue