Fix Windows build
This commit is contained in:
@@ -37,7 +37,7 @@ http://www.3dconnexion.com/forum/viewtopic.php?f=19&t=4968&sid=72c018bdcf0e6edc9
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "GuiNativeEventLinux.h"
|
||||
#include "GuiNativeEventWin32.h"
|
||||
|
||||
#include <QGlobalStatic>
|
||||
#include <QMainWindow>
|
||||
@@ -192,7 +192,7 @@ Gui::GuiNativeEvent::~GuiNativeEvent()
|
||||
}
|
||||
}
|
||||
|
||||
void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window)
|
||||
void Gui::GuiNativeEvent::initSpaceball(QMainWindow *mainWindow)
|
||||
{
|
||||
mainApp->setSpaceballPresent(Is3dmouseAttached());
|
||||
|
||||
@@ -299,7 +299,7 @@ void Gui::GuiNativeEvent::Move3d(HANDLE device, std::vector<float>& motionData)
|
||||
motionDataArray[4] = ceil(motionData[4]);
|
||||
motionDataArray[5] = ceil(motionData[5]);
|
||||
|
||||
mainApp->postMotionEvent(&motionDataArray[0]);
|
||||
mainApp->postMotionEvent(motionDataArray);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -32,32 +32,15 @@
|
||||
|
||||
//#define _WIN32_WINNT 0x0501 //target at least windows XP
|
||||
#include <Windows.h>
|
||||
#include <QAbstractNativeEventFilter>
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include "GuiRawInputEventFilter.h"
|
||||
#endif
|
||||
|
||||
class QMainWindow;
|
||||
class GUIApplicationNativeEventAware;
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
#if QT_VERSION >= 0x050000
|
||||
class RawInputEventFilter : public QAbstractNativeEventFilter
|
||||
{
|
||||
public:
|
||||
typedef bool (*EventFilter)(void *message, long *result);
|
||||
RawInputEventFilter(EventFilter filter) : eventFilter(filter) {
|
||||
}
|
||||
virtual ~RawInputEventFilter() {
|
||||
}
|
||||
|
||||
virtual bool nativeEventFilter(const QByteArray & /*eventType*/, void *message, long *result) {
|
||||
return eventFilter(message, result);
|
||||
}
|
||||
|
||||
private:
|
||||
EventFilter eventFilter;
|
||||
};
|
||||
#endif // if QT_VERSION >= 0x050000
|
||||
class GUIApplicationNativeEventAware;
|
||||
|
||||
class GuiNativeEvent : public QObject
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef GUIRAWNATIVEINPUTEVENTFILTER_H
|
||||
#define GUIRAWNATIVEINPUTEVENTFILTER_H
|
||||
|
||||
#include <QAbstractNativeEventFilter>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
class RawInputEventFilter : public QAbstractNativeEventFilter
|
||||
|
||||
Reference in New Issue
Block a user