feat(input): encapsulate joystick polling functions#213
Conversation
| using JoystickAxes = std::vector<float>; | ||
| using JoystickButtons = std::vector<unsigned char>; |
There was a problem hiding this comment.
Honeslty I don't understand those types. What are they purposes ? And when I look at them, they are always composed of 2 values, so shoud we use glm::vec2 instead of std::vector ?
There was a problem hiding this comment.
they are not, if you have a controller with multiple axes the vector won't have two values
same for the buttons, a controller can have a lot
those two types are made to make it cleaner to read, maybe it is not ? if not I can just use vectors
There was a problem hiding this comment.
to clarify: in the implementation, it looks like there are two values but it is not : it is a constructor of vectors that allows to create one based on raw pointers. so the size is not always 2
|



Related to:
I have encapsulated the functions to get axes and buttons data
Note: