This repository has been archived by the owner on Mar 30, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed incorrect direct copying of returned button array bytes into C# Boolean array. According to this page, https://msdn.microsoft.com/en-us/library/windows/desktop/bb151897(v=vs.85).aspx, the data format states that the value of the byte will be 128 if the button is on and 0 if the button is off. By directly copying the byte value of 128 into a bool, an invalid Boolean is created which initially doesn't cause any problems, but will fail if you bitwise or the bool giving you a value of 129 which evaluates to false when compared to C# true (1). This error also existed in JoystickState in a past version and was updated. The same error in MouseState was never updated however.
- Loading branch information