USB: Fix inverted mouse wheel (#10158)

fixes usb mouse wheel inputs for e.g. Half-Life
This commit is contained in:
Lucy Phipps 2023-10-21 17:02:27 +01:00 committed by GitHub
parent 833cb48050
commit 0a8f71e76e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -858,7 +858,7 @@ namespace usb_hid
{
InputEvent evt;
evt.type = INPUT_EVENT_KIND_BTN;
evt.u.btn.button = (delta > 0.0f) ? INPUT_BUTTON_WHEEL_DOWN : INPUT_BUTTON_WHEEL_UP;
evt.u.btn.button = (delta > 0.0f) ? INPUT_BUTTON_WHEEL_UP : INPUT_BUTTON_WHEEL_DOWN;
evt.u.btn.down = true;
hid.ptr.eh_entry(&hid, &evt);
hid.ptr.eh_sync(&hid);