mirror of
https://github.com/overte-org/overte.git
synced 2025-06-15 16:39:07 +02:00
fix GetVersionEx warning
This commit is contained in:
parent
776acf2182
commit
2eaeb26b2a
1 changed files with 3 additions and 6 deletions
|
@ -160,6 +160,8 @@ ConnexionClient& ConnexionClient::getInstance() {
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
||||||
|
#include <VersionHelpers.h>
|
||||||
|
|
||||||
void ConnexionClient::toggleConnexion(bool shouldEnable) {
|
void ConnexionClient::toggleConnexion(bool shouldEnable) {
|
||||||
ConnexionData& connexiondata = ConnexionData::getInstance();
|
ConnexionData& connexiondata = ConnexionData::getInstance();
|
||||||
if (shouldEnable && connexiondata.getDeviceID() == 0) {
|
if (shouldEnable && connexiondata.getDeviceID() == 0) {
|
||||||
|
@ -425,18 +427,13 @@ bool ConnexionClient::InitializeRawInput(HWND hwndTarget) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME - http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe
|
|
||||||
// Get OS version.
|
|
||||||
OSVERSIONINFO osvi = { sizeof(OSVERSIONINFO), 0 };
|
|
||||||
::GetVersionEx(&osvi);
|
|
||||||
|
|
||||||
unsigned int cbSize = sizeof(devicesToRegister[0]);
|
unsigned int cbSize = sizeof(devicesToRegister[0]);
|
||||||
for (size_t i = 0; i < numDevices; i++) {
|
for (size_t i = 0; i < numDevices; i++) {
|
||||||
// Set the target window to use
|
// Set the target window to use
|
||||||
//devicesToRegister[i].hwndTarget = hwndTarget;
|
//devicesToRegister[i].hwndTarget = hwndTarget;
|
||||||
|
|
||||||
// If Vista or newer, enable receiving the WM_INPUT_DEVICE_CHANGE message.
|
// If Vista or newer, enable receiving the WM_INPUT_DEVICE_CHANGE message.
|
||||||
if (osvi.dwMajorVersion >= 6) {
|
if (IsWindowsVistaOrGreater()) {
|
||||||
devicesToRegister[i].dwFlags |= RIDEV_DEVNOTIFY;
|
devicesToRegister[i].dwFlags |= RIDEV_DEVNOTIFY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue