Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mpc-hc/AboutDlg.cpp')
-rw-r--r--src/mpc-hc/AboutDlg.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/mpc-hc/AboutDlg.cpp b/src/mpc-hc/AboutDlg.cpp
index 7da4f0355..42560e5f5 100644
--- a/src/mpc-hc/AboutDlg.cpp
+++ b/src/mpc-hc/AboutDlg.cpp
@@ -27,7 +27,6 @@
#include "mplayerc.h"
#include "FileVersionInfo.h"
#include "PathUtils.h"
-#include "SysVersion.h"
#include "VersionInfo.h"
#include "WinapiFunc.h"
#include <afxole.h>
@@ -156,7 +155,12 @@ BOOL CAboutDlg::OnInitDialog()
m_buildDate = VersionInfo::GetBuildDateString();
- OSVERSIONINFOEX osVersion = SysVersion::GetFullVersion();
+#pragma warning(push)
+#pragma warning(disable: 4996)
+ OSVERSIONINFOEX osVersion = { sizeof(OSVERSIONINFOEX) };
+ GetVersionEx(reinterpret_cast<LPOSVERSIONINFO>(&osVersion));
+#pragma warning(pop)
+
m_OSName.Format(_T("Windows NT %1u.%1u (build %u"),
osVersion.dwMajorVersion, osVersion.dwMinorVersion, osVersion.dwBuildNumber);
if (osVersion.szCSDVersion[0]) {
@@ -165,7 +169,14 @@ BOOL CAboutDlg::OnInitDialog()
m_OSName += _T(")");
}
m_OSVersion.Format(_T("%1u.%1u"), osVersion.dwMajorVersion, osVersion.dwMinorVersion);
- if (SysVersion::Is64Bit()) {
+
+#if !defined(_WIN64)
+ // 32-bit programs run on both 32-bit and 64-bit Windows
+ // so must sniff
+ BOOL f64 = FALSE;
+ if (IsWow64Process(GetCurrentProcess(), &f64) && f64)
+#endif
+ {
m_OSVersion += _T(" (64-bit)");
}