RawInputMod
RawInputMod copied to clipboard
Fixed fatal errors that broke the mod
There were two key errors in the original mod that made it not work.
- 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.
- 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.