Merge pull request #6 from cgutman/input_fixes

Add support for X1/X2 mouse buttons and Super keys
This commit is contained in:
loki-47-6F-64 2020-01-19 11:46:10 +01:00 committed by GitHub
commit ee067f4d8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 8 deletions

View file

@ -104,7 +104,7 @@ void passthrough(std::shared_ptr<input_t> &input, PNV_MOUSE_BUTTON_PACKET packet
display_cursor = true;
auto button = util::endian::big(packet->button);
if(button > 0 && button < 4) {
if(button > 0 && button < input->mouse_press.size()) {
input->mouse_press[button] = packet->action != BUTTON_RELEASED;
}