mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 23:21:58 +00:00
Use newer versionHelper API if available
This commit is contained in:
parent
b9950b1cd1
commit
0aa247dbf2
3 changed files with 15 additions and 0 deletions
|
@ -152,11 +152,16 @@ int main(int argc, char **argv)
|
|||
// XP and Vista users can't use the newest exchndl.dll
|
||||
// and older exchndl.dll won't work with release builds >= 2.1.21
|
||||
// Check for >= Version 6.1 (>= Win7)
|
||||
#if defined(_INC_VERSIONHELPERS) || defined(_versionhelpers_H_INCLUDED_)
|
||||
if (IsWindows7OrGreater())
|
||||
LoadLibraryA("exchndl.dll");
|
||||
#else
|
||||
DWORD winversion = GetVersion();
|
||||
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
|
||||
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
|
||||
if (major > 6 || (major == 6 && minor > 0))
|
||||
LoadLibraryA("exchndl.dll");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifndef __MINGW32__
|
||||
|
|
|
@ -221,11 +221,16 @@ int main(int argc, char **argv)
|
|||
// XP and Vista users can't use the newest exchndl.dll
|
||||
// and older exchndl.dll won't work with release builds >= 2.1.21
|
||||
// Check for >= Version 6.1 (>= Win7)
|
||||
#if defined(_INC_VERSIONHELPERS) || defined(_versionhelpers_H_INCLUDED_)
|
||||
if (IsWindows7OrGreater())
|
||||
LoadLibraryA("exchndl.dll");
|
||||
#else
|
||||
DWORD winversion = GetVersion();
|
||||
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
|
||||
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
|
||||
if (major > 6 || (major == 6 && minor > 0))
|
||||
LoadLibraryA("exchndl.dll");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -668,11 +668,16 @@ int WINAPI WinMain (HINSTANCE hInstance,
|
|||
// XP and Vista users can't use the newest exchndl.dll
|
||||
// and older exchndl.dll won't work with release builds >= 2.1.21
|
||||
// Check for >= Version 6.1 (Win7)
|
||||
#if defined(_INC_VERSIONHELPERS) || defined(_versionhelpers_H_INCLUDED_)
|
||||
if (IsWindows7OrGreater())
|
||||
LoadLibraryA("exchndl.dll");
|
||||
#else
|
||||
DWORD winversion = GetVersion();
|
||||
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
|
||||
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
|
||||
if (major > 6 || (major == 6 && minor > 0))
|
||||
LoadLibraryA("exchndl.dll");
|
||||
#endif
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue