RuiGraca
asked on
Detect force feed back effects
I tried everthing mmsystem.pas, directx components delphix( I really do not like to use components because I need to study the code behind it), I do not have any more ideas so if someone could help me...
I got a sidewinder from logiteck that i would like to add some my one effects to the efects that are hapenning when I trigger in the control pannel a button I can detect the button but i can not detect the efect, there needs to be a way :)
Is there a procedure, function anything??
I got a sidewinder from logiteck that i would like to add some my one effects to the efects that are hapenning when I trigger in the control pannel a button I can detect the button but i can not detect the efect, there needs to be a way :)
Is there a procedure, function anything??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
Forgot to mention the DelphiX components
http://www.yks.ne.jp/~hori/DelphiX-e.html
In the sample folder, there is a folder called FFEffects and in the folde called Sample there is 3 demos. One of them give a sample like this:
procedure TMainForm.TimerTimer(Sende
begin
DXInput1.Update;
if (isButton1 in DXInput1.States) and (not (isButton1 in FOldStates)) then
begin
DXInput1.Joystick.Effects.
end else
if (not (isButton1 in DXInput1.States)) and (isButton1 in FOldStates) then
begin
DXInput1.Joystick.Effects.
end;
FOldStates := DXInput1.States;
end;
Maybe the uit DXInput can gives you more infos. It contains this:
TForceFeedbackEffect = class;
TForceFeedbackEffects = class;
TForceFeedbackEffectObject
private
FAxes: array[0..1] of DWORD;
FAxesCount: Integer;
Feff: TDIEffect;
FDirections: array[0..1] of DWORD;
FEnvelope: TDIEnvelope;
FConstantForce: TDIConstantForce;
FCondition: TDICondition;
FPeriodic: TDIPeriodic;
FEffect: IDirectInputEffect;
procedure Clear;
procedure Init(Effect: TForceFeedbackEffect);
procedure Release;
public
destructor Destroy; override;
end;
Hope this can also help.
ASKER