This commit is contained in:
Steve Checkoway
2006-01-18 09:44:30 +00:00
parent 852ba5f336
commit d5cde8a0f7
2 changed files with 10 additions and 9 deletions
@@ -57,11 +57,11 @@ struct Joystick
};
Joystick::Joystick() : id( DEVICE_NONE ),
x_axis( DeviceButton_Invalid ),
y_axis( DeviceButton_Invalid ),
z_axis( DeviceButton_Invalid ),
x_min( 0 ), y_min( 0 ), z_min( 0 ),
x_max( 0 ), y_max( 0 ), z_max( 0 )
x_axis( DeviceButton_Invalid ),
y_axis( DeviceButton_Invalid ),
z_axis( DeviceButton_Invalid ),
x_min( 0 ), y_min( 0 ), z_min( 0 ),
x_max( 0 ), y_max( 0 ), z_max( 0 )
{
}
@@ -82,7 +82,9 @@ protected:
virtual void Open() = 0;
inline void AddElementToQueue( int cookie )
{ CALL( mQueue, addElement, IOHIDElementCookie(cookie), 0 ); }
{
CALL( mQueue, addElement, IOHIDElementCookie(cookie), 0 );
}
public:
Device();
virtual ~Device();
@@ -709,7 +711,7 @@ int InputHandler_Carbon::Run( void *data )
* to by context does not need to persist beyond the function call. */
CFRunLoopObserverContext context = { 0, &This->mSem, NULL, NULL, NULL };
CFRunLoopObserverRef o = CFRunLoopObserverCreate( kCFAllocatorDefault, kCFRunLoopEntry,
false, 0, RunLoopStarted, &context);
false, 0, RunLoopStarted, &context);
CFRunLoopAddObserver( This->mLoopRef, o, kCFRunLoopDefaultMode );
CFRunLoopRun();
LOG->Trace( "Shutting down input handler thread..." );
@@ -23,8 +23,7 @@ public:
InputHandler_Carbon();
~InputHandler_Carbon();
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut,
vector<CString>& vDescriptionsOut );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
static void QueueCallBack( void *target, int result, void *refcon, void *sender );
};