Mercurial > sdl-ios-xcode
diff src/joystick/win32/SDL_dxjoystick.c @ 2698:e1da92da346c gsoc2008_nds
Clean up.
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Wed, 27 Aug 2008 04:23:38 +0000 |
parents | fe19afb86473 |
children |
line wrap: on
line diff
--- a/src/joystick/win32/SDL_dxjoystick.c Thu Aug 21 12:38:21 2008 +0000 +++ b/src/joystick/win32/SDL_dxjoystick.c Wed Aug 27 04:23:38 2008 +0000 @@ -226,8 +226,8 @@ result = IDirectInput_CreateDevice(dinput, - &SYS_Joystick[joystick->index]. - guidInstance, &device, NULL); + &SYS_Joystick[joystick->index].guidInstance, + &device, NULL); if (FAILED(result)) { SetDIerror("IDirectInput::CreateDevice", result); return (-1); @@ -236,8 +236,8 @@ /* Now get the IDirectInputDevice2 interface, instead. */ result = IDirectInputDevice_QueryInterface(device, &IID_IDirectInputDevice2, - (LPVOID *) & joystick-> - hwdata->InputDevice); + (LPVOID *) & joystick->hwdata-> + InputDevice); /* We are done with this object. Use the stored one from now on. */ IDirectInputDevice_Release(device); @@ -249,8 +249,8 @@ /* Aquire shared access. Exclusive access is required for forces, * though. */ result = - IDirectInputDevice2_SetCooperativeLevel(joystick->hwdata-> - InputDevice, SDL_Window, + IDirectInputDevice2_SetCooperativeLevel(joystick->hwdata->InputDevice, + SDL_Window, DISCL_EXCLUSIVE | DISCL_BACKGROUND); if (FAILED(result)) { @@ -289,8 +289,8 @@ /* reset all accuators. */ result = - IDirectInputDevice2_SendForceFeedbackCommand(joystick->hwdata-> - InputDevice, + IDirectInputDevice2_SendForceFeedbackCommand(joystick-> + hwdata->InputDevice, DISFFC_RESET); if (FAILED(result)) { @@ -481,9 +481,8 @@ case BUTTON: SDL_PrivateJoystickButton_Int(joystick, in->num, - (Uint8) (state. - rgbButtons[in->ofs - - DIJOFS_BUTTON0] + (Uint8) (state.rgbButtons[in->ofs - + DIJOFS_BUTTON0] ? SDL_PRESSED : SDL_RELEASED)); break; @@ -539,8 +538,8 @@ break; case BUTTON: SDL_PrivateJoystickButton(joystick, in->num, - (Uint8) (evtbuf[i]. - dwData ? SDL_PRESSED : + (Uint8) (evtbuf[i].dwData ? + SDL_PRESSED : SDL_RELEASED)); break; case HAT: