Skip to content

Commit 940f2f1

Browse files
committed
[Imp] mpt/osinfo/windows_wine_version.hpp: Speedup Wine detection in modern builds.
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@24794 56274372-70c3-4bfc-bfc3-4c3a0b034d27
1 parent 8f72f20 commit 940f2f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mpt/osinfo/windows_wine_version.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ namespace windows {
3131
inline bool current_is_wine() {
3232
bool result = false;
3333
#if MPT_OS_WINDOWS && !MPT_OS_WINDOWS_WINRT
34+
#if MPT_WINNT_AT_LEAST(MPT_WIN_8)
35+
const bool hasKB2533623 = true;
36+
#else // !Win8
3437
bool hasKB2533623 = false;
3538
mpt::osinfo::windows::Version WindowsVersion = mpt::osinfo::windows::Version::Current();
3639
if (WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::Win8)) {
@@ -45,6 +48,7 @@ inline bool current_is_wine() {
4548
hKernel32DLL = NULL;
4649
}
4750
}
51+
#endif // Win8
4852
HMODULE hNTDLL = NULL;
4953
MPT_MAYBE_CONSTANT_IF (hasKB2533623) {
5054
#if defined(LOAD_LIBRARY_SEARCH_SYSTEM32)

0 commit comments

Comments
 (0)