Merge pull request #5894 from ZappoMan/fixWarning

More warnings fixes
This commit is contained in:
Clément Brisset 2015-09-24 18:35:50 +02:00
commit cb1f5d4e8a
2 changed files with 12 additions and 6 deletions

View file

@ -160,6 +160,8 @@ ConnexionClient& ConnexionClient::getInstance() {
#ifdef Q_OS_WIN
#include <VersionHelpers.h>
void ConnexionClient::toggleConnexion(bool shouldEnable) {
ConnexionData& connexiondata = ConnexionData::getInstance();
if (shouldEnable && connexiondata.getDeviceID() == 0) {
@ -425,18 +427,13 @@ bool ConnexionClient::InitializeRawInput(HWND hwndTarget) {
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]);
for (size_t i = 0; i < numDevices; i++) {
// Set the target window to use
//devicesToRegister[i].hwndTarget = hwndTarget;
// If Vista or newer, enable receiving the WM_INPUT_DEVICE_CHANGE message.
if (osvi.dwMajorVersion >= 6) {
if (IsWindowsVistaOrGreater()) {
devicesToRegister[i].dwFlags |= RIDEV_DEVNOTIFY;
}
}

View file

@ -38,11 +38,20 @@
#pragma GCC diagnostic ignored "-Wdouble-promotion"
#endif
#ifdef WIN32
#pragma warning (push)
#pragma warning (disable: 4273 4305)
#endif
extern "C" {
#include <gverb/gverb.h>
#include <gverb/gverbdsp.h>
}
#ifdef WIN32
#pragma warning (pop)
#endif
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif