From eed951e0461bb7357c7832f434900c5c06dbce2d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 23 Feb 2011 19:44:04 -0600 Subject: [PATCH] more MouseDevice changes --- src/archutils/Darwin/MouseDevice.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/archutils/Darwin/MouseDevice.cpp b/src/archutils/Darwin/MouseDevice.cpp index 1d2602b634..274827c034 100644 --- a/src/archutils/Darwin/MouseDevice.cpp +++ b/src/archutils/Darwin/MouseDevice.cpp @@ -35,16 +35,14 @@ void MouseDevice::AddElement( int usagePage, int usage, IOHIDElementCookie cooki if( usagePage >= kHIDPage_VendorDefinedStart ) return; - ASSERT(m_Mouse); Mouse& m = m_Mouse; - int iMin = 0; - int iMax = 0; + switch( usagePage ) { case kHIDPage_GenericDesktop: - iMin = 0; + int iMin = 0; IntValue( CFDictionaryGetValue(properties, CFSTR(kIOHIDElementMinKey)), iMin ); - iMax = 0; + int iMax = 0; IntValue( CFDictionaryGetValue(properties, CFSTR(kIOHIDElementMaxKey)), iMax ); // based on usage