xboxscene.org forums

Author Topic: Sdlx Joystick Question  (Read 34 times)

JapanFred

  • Archived User
  • Full Member
  • *
  • Posts: 116
Sdlx Joystick Question
« on: January 10, 2005, 07:31:00 AM »

smile.gif
Logged

JapanFred

  • Archived User
  • Full Member
  • *
  • Posts: 116
Sdlx Joystick Question
« Reply #1 on: January 12, 2005, 01:55:00 PM »

CODE

typedef struct GamePad
{
    // The following members are inherited from XINPUT_GAMEPAD:
    WORD    wButtons;
    BYTE    bAnalogButtons[8];
    SHORT   sThumbLX;
    SHORT   sThumbLY;
    SHORT   sThumbRX;
    SHORT   sThumbRY;

    // Thumb stick values converted to range [-1,+1]
    FLOAT      fX1;
    FLOAT      fY1;
    FLOAT      fX2;
    FLOAT      fY2;
    
    // State of buttons tracked since last poll
    WORD       wLastButtons;
    BOOL       bLastAnalogButtons[8];
    WORD       wPressedButtons;
    BOOL       bPressedAnalogButtons[8];

    // Rumble properties

   ///////////////////////////////////////////////////////////////
    XINPUT_RUMBLE   Rumble;
    XINPUT_FEEDBACK Feedback;
  ////////////////////////////////////////////////////////////////
    // Device properties
    XINPUT_CAPABILITIES caps;
    HANDLE     hDevice;

    // Flags for whether game pad was just inserted or removed
    BOOL       bInserted;
    BOOL       bRemoved;
} XBGAMEPAD;



I've surrounded the Rumble aspets in question with //'s smile.gif

Im not sure how you'd interact with these though...
Logged

freakdave

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 284
Sdlx Joystick Question
« Reply #2 on: January 13, 2005, 09:32:00 AM »

I'll look into it, too...
Logged

Ecrofirt

  • Archived User
  • Full Member
  • *
  • Posts: 166
Sdlx Joystick Question
« Reply #3 on: February 08, 2005, 10:08:00 PM »

Has anyone been able to figure out how to get this working yet?

I've tried different things, but I can't seem to figure it out.

edit:

I'm no expert, but on further inspection, it looks like someone might need to add a function into the SDL_joystick.c file.

Maybe something like SDL_JoystickSetRumble

where you could do XInputSetState() and send it feedback information.

If this makes sense, is there any way anyone might be able to add it in? I'm not good enough yet to be able to do anything like that, or I would.
Logged