Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

I wish I hadn't left setting up my cab to the last minute as the latest version of GameEx constantly moves the selector bar downwards as if I'm holding down on one of my Logitech wirless joysticks.

I tested my IPAC and keyboard and it's not them, and it's pretty obvious that it's the joystick. So I launched one of my own joystick test programs and the joystick is fine.

My guess is the following bugs in the DirectInput implementation can cause this problem:

1. Not using DInput.Device.Properties.SetRange() to set a common range. Some joysticks have different min and max values and that can be different depending on callibration aswell. The only way to ensure the data is consistant is to use SetRange()

2. The axis threshold is too low so it detects input when it's in it's deadzone. Usually 1. will solve this problem. The values I set using SetRange() are:

private const int AXIS_MIN = -255;
private const int AXIS_NONE = 0;
private const int AXIS_ERROR = 128;
private const int AXIS_MAX = 255;

When I acquire the joysticks, I use the following:

 m_joyDevice[m_joyCount].Properties.AxisModeAbsolute = true;

SetAxisRange(m_joyDevice[m_joyCount]);

And the code to set the range:

private void SetAxisRange(DInput.Device joyDevice)
{
// Enumerate any axes
foreach (DInput.DeviceObjectInstance doi in joyDevice.Objects)
{
if ((doi.ObjectId & (int)DInput.DeviceObjectTypeFlags.Axis) != 0)
joyDevice.Properties.SetRange(DInput.ParameterHow.ById, doi.ObjectId, new DInput.InputRange(AXIS_MIN, AXIS_MAX));
}
}

The AXIS_ERROR is the "deadzone" which is quite large but works fine on the joysticks I've tested. A large deadzone for a FE is fine and ensures even the most loose joysticks won't have unintentional input detected.

I will see if I can turn off joystick input in GameEx for now..

Posted

BTW As with a previous user having a similar problem I do have PPJoy Virtual Joystick installed so it could be that causing it. Either way my points about using SetRange() are still valid as this is still the most likely cause of the problem.

EDIT: I can confirm it is the PPJoy Virtual Joystick and probably because it's POV range is not set and it's detecting movement.

The temporary solution for now is to only enable joystick input for the Logitec's *phew*

Guest
This topic is now closed to further replies.
×
×
  • Create New...