From eaba89aa036256f4bdbf5e517e68c7db695be47b Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 04:05:43 -0600 Subject: [PATCH] last mouse code commit for the night --- src/RageInputDevice.h | 6 ++++++ src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/RageInputDevice.h b/src/RageInputDevice.h index 704995736d..51e41a0c0d 100644 --- a/src/RageInputDevice.h +++ b/src/RageInputDevice.h @@ -320,12 +320,18 @@ public: * debouncing applied. */ bool bDown; + // Mouse coordinates + unsigned x; + unsigned y; + RageTimer ts; DeviceInput(): device(InputDevice_Invalid), button(DeviceButton_Invalid), level(0), bDown(false), ts(RageZeroTimer) { } DeviceInput( InputDevice d, DeviceButton b, float l=0 ): device(d), button(b), level(l), bDown(l > 0.5f), ts(RageZeroTimer) { } DeviceInput( InputDevice d, DeviceButton b, float l, const RageTimer &t ): device(d), button(b), level(l), bDown(level > 0.5f), ts(t) { } + DeviceInput( InputDevice d, DeviceButton b, const RageTimer &t, unsigned xPos=0, unsigned yPos=0 ): + device(d), button(b), x(xPos), y(yPos), bDown(false), ts(t) { } bool operator==( const DeviceInput &other ) const { diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index e71453aadb..6860dcb74d 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -340,7 +340,6 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L } else if(dev->dwType & DIDFT_AXIS) { - LOG->Trace("found a mouse axis"); // todo: how to handle this correctly? -aj in.type = in.AXIS; in.num = device->axes;