RawInputMod icon indicating copy to clipboard operation
RawInputMod copied to clipboard

Fixed fatal errors that broke the mod

Open CAG2Mark opened this issue 3 years ago • 4 comments

There were two key errors in the original mod that made it not work.

  1. When iterating through the list of controllers, if there was one exception in the entire process, the entire for loop would exit. This means that if in the list of controllers, a faulty controller is before the desired controller, the desired controller would never be reached.
  2. The original code checked for float equality (namely, the mouse position to the double 0.0 exactly). Due to floating point errors, this is a very bad idea. The best solution is to compare a range of values (for example, -0.1 < x < 0.1).

I've fixed both these issues and can confirm the mod now works.

CAG2Mark avatar May 23 '21 07:05 CAG2Mark