shauleiz / vJoy

Virtual Joystick
http://vjoystick.sourceforge.net
MIT License
606 stars 168 forks source link

All FFB effects seems to be "DirectionEnabled" (polar) #64

Open MichalBerner opened 2 years ago

MichalBerner commented 2 years ago

vJoy v 2.2.1.1

All effect reports (FFB_EFF_REPORT) seems to have

This happens even if there is effect created for only one axis and you might expect AxisEnabledDirection to be equal 1 for X axis and 2 for Y axis.

I tried to create one axis effects with Force Editor but I was not able to create any "non polar" effect using both Force Editor and ForceTest.

cyberluke commented 2 years ago

Hi, I'm helping with my custom fork for retrogaming (Windows XP, 7, 10). I can help a little.

How can I test your use case? I have FEdit.exe and can create all the effects, but it is always polar. Where is some checkbox to use cartesian or spherical coords in FEdit?

Some screenshot would help.

BTW: I fixed SlimDX Ramp effect, the pull request been already merged in SlimDX.

MichalBerner commented 1 year ago

Hi @cyberluke Sorry for late response. I'm not really sure where the problem is - if it's on a vJoy side or if it's something in a FEdit.exe... However... steps that I'm taking to create (what I would expect to be) a non polar effect are:

  1. Run FEdit.exe

  2. Add Spring Effect

  3. Open Effect Properties

  4. Go to Axes tab

  5. Choose Second Axis to (None) image

  6. There is a sort of a bug in Force Editor: if you would press Play now - the effect would be created like a second axis is still selected). So the trick is to click outside of the Force Editor (to loose focus), go back to the application and press Play.

  7. If we have an application with FFB callback registered we would be able to notice that effect is created with EnabledAxis set to Direction (not X or Y what one would expect for single axis effect).

If the First Axis is set to the X Axis than effect would have a Direction value set to 8191 image

If the First Axis is set to the Y Axis than effect would have a Direction value set to 0 image

DirX value follows the Direction value DirY and Enabled Axis values remains unchanged in both cases

(* the right part of the screenshot comes from my app but logging the effect report would show the same)

njz3 commented 1 year ago

Hi, fedit.exe seems actually to always pick a polar direction, whatever the selection is made, and define an angle to indicate vector Y (0° = 0 out of 32767) or X (90° = 8191 out of 32767). So i am not sure it is a bug within vJoy. Do you have another tool to generate DirectInput effects with an axis disabled ?