PDA

View Full Version : DIPROP_AUTOCENTER



tux
08-03-2005, 07:30 PM
im trying to turn auto center off but im not understanding it.

from the MSDN site it sais


DIPROP_AUTOCENTER
Specifies whether device objects are self centering. This setting applies to the entire device, rather than to any particular object, so the dwHow member of the associated DIPROPDWORD structure must be DIPH_DEVICE.

The dwData member can be one of the following values.

DIPROPAUTOCENTER_OFF: The device should not automatically center when the user releases the device. An application that uses force feedback should disable autocentering before playing effects.

DIPROPAUTOCENTER_ON: The device should automatically center when the user releases the device.

Not all devices support the autocenter property.

and im sending the header in, but it has no place for data


DIPROPHEADER = packed record
dwSize: DWORD;
dwHeaderSize: DWORD;
dwObj: DWORD;
dwHow: DWORD;
end;


im doing this...




var
dipdw: DIPROPDWORD;

dipdw.diph.dwSize:= sizeof(DIPROPDWORD);
dipdw.diph.dwHeaderSize:= sizeof(DIPROPHEADER);
dipdw.diph.dwObj:= 0;
dipdw.diph.dwHow:= DIPH_DEVICE;
dipdw.dwData:= 0;

if Succeeded(Device.SetProperty(DIPROP_AUTOCENTER, dipdw.diph)) then



i asume i put it in the dipdw.dwData:= 0; but thats not actually passed to direct input

whats wrong?

tux
08-03-2005, 09:05 PM
doesnt matter now. after sending some forces to the wheel it behaves as i need :)


but ive got a new problem.

how do i apply a different constant force to y axis then to x? do i have to send 2 effects?

Clootie
09-03-2005, 12:33 PM
Have you played with FEdit.exe utility from DirectX SDK?

tux
09-03-2005, 12:45 PM
ive got the december 2004 SDK and cant find it...


the force feedback im going to be doing will just take torque from the steering wheel or other things (so i dont need effects like wooden bridge or explosion etc)

Clootie
09-03-2005, 01:05 PM
Well, it's still in Oct-04 SDK. Maybe in Dec-04 and later MS moved it to "extra" download.
I've just assumed that it's easier to just play ffe files than to generate them at runtime.