Unity-DirectInput icon indicating copy to clipboard operation
Unity-DirectInput copied to clipboard

Added custom force feedback & fix periodic effects and many more features

Open ATG-Simulator opened this issue 11 months ago • 0 comments

  • Add DIPERIODIC structure support for Sine/Square/Triangle/Sawtooth effects

  • Implement proper effect creation and parameter handling

  • Add effect cleanup and release in DestroyFFBEffect

  • Fix memory management for periodic effects

  • Add debug logging for effect lifecycle tracking

  • Fix effect persistence after device reattachment

  • Set correct periodic effect parameters (magnitude, period, phase)

  • Integrate with existing FFB effect management system

  • Fixed periodic effects initialization and updates

  • Added debug logging system for FFB effect creation and updates

  • Implemented proper force data array management

  • Added sample period handling based on device capabilities

  • Corrected effect parameter initialization sequence

  • Added proper cleanup for custom force resources

  • Improved error handling and debug reporting

Technical details:

  • Implemented DICUSTOMFORCE structure with proper initialization
  • Added support for 10 magnitude inputs and sample period control
  • Fixed effect parameter synchronization between C++ and C#
  • Added proper memory management for force data arrays
  • Fixed E_INVALIDARG (0x80070057) error debugging
  • Added comprehensive debug logging system
  • Added proper cleanup in DestroyFFBEffect

Known issues:

  • Custom force effect creation still returns E_INVALIDARG despite correct parameters
  • Device reports custom force support but rejects effect creation

Note: Custom force implementation needs further investigation as the device reports support but rejects creation with proper parameters. A debug log will be created once it tested every time.

ATG-Simulator avatar Dec 24 '24 23:12 ATG-Simulator