last mouse code commit for the night

This commit is contained in:
AJ Kelly
2011-02-15 04:05:43 -06:00
parent 2d71b91c25
commit eaba89aa03
2 changed files with 6 additions and 1 deletions
+6
View File
@@ -320,12 +320,18 @@ public:
* debouncing applied. */ * debouncing applied. */
bool bDown; bool bDown;
// Mouse coordinates
unsigned x;
unsigned y;
RageTimer ts; RageTimer ts;
DeviceInput(): device(InputDevice_Invalid), button(DeviceButton_Invalid), level(0), bDown(false), ts(RageZeroTimer) { } 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=0 ): device(d), button(b), level(l), bDown(l > 0.5f), ts(RageZeroTimer) { }
DeviceInput( InputDevice d, DeviceButton b, float l, const RageTimer &t ): DeviceInput( InputDevice d, DeviceButton b, float l, const RageTimer &t ):
device(d), button(b), level(l), bDown(level > 0.5f), ts(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 bool operator==( const DeviceInput &other ) const
{ {
@@ -340,7 +340,6 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L
} }
else if(dev->dwType & DIDFT_AXIS) else if(dev->dwType & DIDFT_AXIS)
{ {
LOG->Trace("found a mouse axis");
// todo: how to handle this correctly? -aj // todo: how to handle this correctly? -aj
in.type = in.AXIS; in.type = in.AXIS;
in.num = device->axes; in.num = device->axes;