a) Keep in mind that startDelay is not supported in DX5 or lower: In the SetParameters(...) case, we're sure This->effect.replay.delay is set to zero, because the HEAP_ZERO_MEMORY flag was set when allocating the LinuxInputEffectImpl 'This' struct in linuxinput_create_effect(...). So change dinput/effect_linuxinput.c:223 : if (dwFlags & DIEP_STARTDELAY) { peff->dwStartDelay = This->effect.replay.delay * 1000; } to : if ((dwFlags & DIEP_STARTDELAY) && (peff->dwSize > sizeof(DIEFFECT_DX5))) { peff->dwStartDelay = This->effect.replay.delay * 1000; }
and change dinput/effect_linuxinput.c:463 : if (dwFlags & DIEP_STARTDELAY) This->effect.replay.delay = peff->dwStartDelay / 1000; to : if ((dwFlags & DIEP_STARTDELAY) && (peff->dwSize > sizeof(DIEFFECT_DX5))) This->effect.replay.delay = peff->dwStartDelay / 1000;
Elias
On Tue, Mar 04, 2014 at 08:19:56PM +0100, Elias Vanderstuyft wrote:
a) Keep in mind that startDelay is not supported in DX5 or lower:
These seem like good fixes. You could add a test by using a DIEFFECT with its dwSize member set to sizeof(DIEFFECT_DX5) to set/get the delay value, and seeing if Windows modifies the delay value in the struct.
Andrew
On Wed, Mar 5, 2014 at 3:56 PM, Andrew Eikum aeikum@codeweavers.com wrote:
On Tue, Mar 04, 2014 at 08:19:56PM +0100, Elias Vanderstuyft wrote:
a) Keep in mind that startDelay is not supported in DX5 or lower:
These seem like good fixes. You could add a test by using a DIEFFECT with its dwSize member set to sizeof(DIEFFECT_DX5) to set/get the delay value, and seeing if Windows modifies the delay value in the struct.
Alright, I'll create the tests when I have time.
Elias