• Advertisement
Sign in to follow this  

DirectInput controller axis

This topic is 4850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using action mapping with directInput8 and have set it up to detect input from a keyboard and a controller, however I'm not sure what values to check the left/right axis against to tell which direction it is being pressed. Any help?

Share this post


Link to post
Share on other sites
Advertisement
bump!

Here's where I check the axis:


case INPUT_ROTATE_AXIS_LR:
{
if(rgdod[j].dwData < 0)
{
BIT_SET(m_uiKeys, KEYBIT_LEFT);
break;
}
else if(rgdod[j].dwData > 0)
{
BIT_SET(m_uiKeys, KEYBIT_LEFT);
break;
}
}


and here's where I initialize the axis min/max values:


m_diaf.lAxisMin = -99;
m_diaf.lAxisMax = 99;


where m_diaf is a DIACTIONFORMAT structure. I know for certain beyond a shadow of a doubt that the code where I check the values is wrong (dwdata is an unsigned type), but I don't know what values I actually should be checking against.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement