From f525c5ca8d9e92e7a40b7b02d540150c70512a67 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sun, 5 Oct 2008 08:54:10 +0000 Subject: [PATCH] Fix logging. Also fix typo. --- .../src/arch/InputHandler/InputHandler_MacOSX_HID.cpp | 8 +++++--- stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp b/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp index 55087e40cb..0d187c3e1a 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp @@ -14,7 +14,7 @@ REGISTER_INPUT_HANDLER_CLASS2( HID, MacOSX_HID ); -void InputHandler_MacOSX_HID::QueueCallBack( void *target, int result, void *refcon, void *sender ) +void InputHandler_MacOSX_HID::QueueCallback( void *target, int result, void *refcon, void *sender ) { // The result seems useless as you can't actually return anything... // refcon is the Device number @@ -27,9 +27,11 @@ void InputHandler_MacOSX_HID::QueueCallBack( void *target, int result, void *ref HIDDevice *dev = This->m_vDevices[int( refcon )]; vector vPresses; - LOG->Trace( "Got event with cookie %p, value %d", event.elementCookie, int(event.value) ); while( (result = CALL(queue, getNextEvent, &event, zeroTime, 0)) == kIOReturnSuccess ) + { + LOG->Trace( "Got event with cookie %p, value %d", event.elementCookie, int(event.value) ); dev->GetButtonPresses( vPresses, event.elementCookie, event.value, now ); + } FOREACH_CONST( DeviceInput, vPresses, i ) INPUTFILTER->ButtonPressed( *i ); } @@ -111,7 +113,7 @@ void InputHandler_MacOSX_HID::StartDevices() ASSERT( m_LoopRef ); FOREACH( HIDDevice *, m_vDevices, i ) - (*i)->StartQueue( m_LoopRef, InputHandler_MacOSX_HID::QueueCallBack, this, n++ ); + (*i)->StartQueue( m_LoopRef, InputHandler_MacOSX_HID::QueueCallback, this, n++ ); CFRunLoopSourceRef runLoopSource = IONotificationPortGetRunLoopSource( m_NotifyPort ); diff --git a/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.h b/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.h index 683c6dbab6..79923b5392 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.h +++ b/stepmania/src/arch/InputHandler/InputHandler_MacOSX_HID.h @@ -36,7 +36,7 @@ public: void GetDevicesAndDescriptions( vector& vDevicesOut ); RString GetDeviceSpecificInputString( const DeviceInput &di ); wchar_t DeviceButtonToChar( DeviceButton button, bool bUseCurrentKeyModifiers ); - static void QueueCallBack( void *target, int result, void *refcon, void *sender ); + static void QueueCallback( void *target, int result, void *refcon, void *sender ); };