From 72e5f44ed61079539ab19f8f5b69b027d3db862e Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 11 Jun 2010 20:41:00 +0200 Subject: [PATCH] Fixed: #972 Do not reset mouse position to implement FreeLook (compilation fix for Windows) --- code/nel/include/nel/misc/di_event_emitter.h | 1 + code/nel/include/nel/misc/event_emitter_multi.h | 1 + code/nel/src/misc/di_event_emitter.cpp | 6 ++++++ code/nel/src/misc/event_emitter_multi.cpp | 7 +++++++ 4 files changed, 15 insertions(+) diff --git a/code/nel/include/nel/misc/di_event_emitter.h b/code/nel/include/nel/misc/di_event_emitter.h index 84034f20d..3094994b5 100644 --- a/code/nel/include/nel/misc/di_event_emitter.h +++ b/code/nel/include/nel/misc/di_event_emitter.h @@ -135,6 +135,7 @@ public: /// from IEventEmitter virtual void submitEvents(CEventServer &server, bool allWindows); + virtual void emulateMouseRawMode(bool enable); // Build a TMouseButton value from the current buttons state TMouseButton buildButtonsFlags() const; diff --git a/code/nel/include/nel/misc/event_emitter_multi.h b/code/nel/include/nel/misc/event_emitter_multi.h index b2350fc7f..6abdf08d8 100644 --- a/code/nel/include/nel/misc/event_emitter_multi.h +++ b/code/nel/include/nel/misc/event_emitter_multi.h @@ -47,6 +47,7 @@ public: const IEventEmitter *getEmitter(uint index) const; /// From IEventEmitter. This call submitEvents on all the emitters virtual void submitEvents(CEventServer &server, bool allWindows); + virtual void emulateMouseRawMode(bool enable); private: typedef std::vector > TEmitterCont; TEmitterCont _Emitters; diff --git a/code/nel/src/misc/di_event_emitter.cpp b/code/nel/src/misc/di_event_emitter.cpp index 2a094d0ef..d01bd124b 100644 --- a/code/nel/src/misc/di_event_emitter.cpp +++ b/code/nel/src/misc/di_event_emitter.cpp @@ -248,6 +248,12 @@ void CDIEventEmitter::submitEvents(CEventServer &server, bool allWindows) _InternalServer.pump(allWindows); } +//========================================================================== +void CDIEventEmitter::emulateMouseRawMode(bool enable) +{ + nlerror("no raw mode emulation on windows, the CDIMouse has a real raw mode"); +} + //========================================================================== /// Tool fct to retrieve the game devices. static BOOL CALLBACK DIEnumDevicesDescCallback diff --git a/code/nel/src/misc/event_emitter_multi.cpp b/code/nel/src/misc/event_emitter_multi.cpp index bd99601f6..52f893659 100644 --- a/code/nel/src/misc/event_emitter_multi.cpp +++ b/code/nel/src/misc/event_emitter_multi.cpp @@ -79,6 +79,13 @@ void CEventEmitterMulti::submitEvents(CEventServer &server, bool allWindows) it->first->submitEvents(server, allWindows); } } + +///============================================================ +void CEventEmitterMulti::emulateMouseRawMode(bool enable) +{ + nlerror("no raw mode emulation on windows, the CDIMouse has a real raw mode"); +} + ///============================================================ IEventEmitter *CEventEmitterMulti::getEmitter(uint index) {