#4978 Removed deprecated usage of GetVersionEx
This commit is contained in:
parent
3ead310161
commit
04184b51ea
|
@ -27,6 +27,8 @@
|
|||
#include "base/Log.h"
|
||||
#include "base/String.h"
|
||||
|
||||
#include <VersionHelpers.h>
|
||||
|
||||
ArgsBase* ArgParser::m_argsBase = NULL;
|
||||
|
||||
ArgParser::ArgParser(App* app) :
|
||||
|
@ -309,12 +311,7 @@ ArgParser::parseGenericArgs(int argc, const char* const* argv, int& i)
|
|||
|
||||
#ifdef WINAPI_MSWINDOWS
|
||||
|
||||
OSVERSIONINFO osvi;
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
GetVersionEx(&osvi);
|
||||
|
||||
if (osvi.dwMajorVersion < 6) {
|
||||
if (!IsWindowsVistaOrGreater()) {
|
||||
useDragDrop = false;
|
||||
LOG((CLOG_INFO "ignoring --enable-drag-drop, not supported below vista."));
|
||||
}
|
||||
|
|
|
@ -728,19 +728,19 @@ static
|
|||
EWheelSupport
|
||||
getWheelSupport()
|
||||
{
|
||||
// get operating system
|
||||
OSVERSIONINFO info;
|
||||
info.dwOSVersionInfoSize = sizeof(info);
|
||||
if (!GetVersionEx(&info)) {
|
||||
return kWheelNone;
|
||||
}
|
||||
|
||||
// see if modern wheel is present
|
||||
if (GetSystemMetrics(SM_MOUSEWHEELPRESENT)) {
|
||||
// note if running on win2k
|
||||
if (info.dwPlatformId == VER_PLATFORM_WIN32_NT &&
|
||||
info.dwMajorVersion == 5 &&
|
||||
info.dwMinorVersion == 0) {
|
||||
OSVERSIONINFOEX osvi;
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
osvi.dwPlatformId = VER_PLATFORM_WIN32_NT;
|
||||
osvi.dwMajorVersion = 5;
|
||||
osvi.dwMinorVersion = 0;
|
||||
ULONGLONG condMask = 0;
|
||||
VER_SET_CONDITION (condMask, VER_MAJORVERSION, VER_EQUAL);
|
||||
VER_SET_CONDITION (condMask, VER_MINORVERSION, VER_EQUAL);
|
||||
VER_SET_CONDITION (condMask, VER_PLATFORMID, VER_EQUAL);
|
||||
if (VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION |
|
||||
VER_PLATFORMID, condMask)) {
|
||||
return kWheelWin2000;
|
||||
}
|
||||
return kWheelModern;
|
||||
|
|
Loading…
Reference in New Issue