Mouse with more than 5 buttons can index outside the expected array
Norodix opened this issue · 1 comments
Norodix commented
I have a mouse that has a 3rd button between the "next" and "previous" buttons. Using this button with and input setting causes a crash.
It crashes at ggs_input_helper.gd:192
.
PunchablePlushie commented
The keywords["mouse"]
array has all the Godot mouse button constants (MOUSE_BUTTON_*
). I'm not sure how handling input binding for mice with 5+ buttons would work. For now, I've added a simple check that prevents the rebind window from accepting mouse input events that are outside the constants defined by Godot itself. This should at the very least prevent crashes.
Sadly, I don't have a way to check if it actually works or not by myself though.