[RFC 3/11] Linux FF: Linux effect parameter: start delay

Elias Vanderstuyft elias.vds at gmail.com
Tue Mar 4 13:19:56 CST 2014


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
-------------- next part --------------
/////////////////////////////    Linux effect parameter: start delay    /////////////////////////////

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;


More information about the wine-devel mailing list