News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Getting my joystick working under Direct Input

Started by hamper, December 01, 2013, 10:00:30 AM

Previous topic - Next topic

dedndave


GoneFishing

You're welcome, Dave
One mistake in  EnumJoysticksCallback proc:
Quote
  .if [edx].DI_ENUM_CONTEXT.bPreferredJoyCfgValid &&  ecx == FALSE
          mov eax, DIENUM_CONTINUE
          ret
  .endif 

Farabi

If I remember correctly I can use joystick without using DXINPUT, there is a joystick function on one of the winAPI, it JOYSTICKEX structure or something, its been long time ago. I can use my Playstation 2 USB joystick with it.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

dedndave

the multi-media library has those functions (mmJoy...)

Farabi

Oh the function name is joyGetPos, use the structure which had EX name on it on the newer version of Windows, it will work on lots of joystick type.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

GoneFishing

Ok, now we know how to handle joystick input with multimedia library and DIRECT INPUT .
There's another way of doing it - using RAW INPUT API.

Siekmanski

Creative coders use backward thinking techniques as a strategy.

dedndave

that looks much cleaner that DirectInput   :P