Skip to content

Commit

Permalink
Use documented name for horizontal wheel raw input flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet authored and Paril committed Dec 10, 2021
1 parent 80740c4 commit c194790
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/windows/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,7 @@ static void raw_mouse_event(PRAWMOUSE rm)
mouse_wheel_event((short)rm->usButtonData);
}

// this flag is undocumented, but confirmed to work on Win7
if (rm->usButtonFlags & 0x0800) {
if (rm->usButtonFlags & RI_MOUSE_HWHEEL) {
mouse_hwheel_event((short)rm->usButtonData);
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/windows/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif
#ifndef RI_MOUSE_HWHEEL
#define RI_MOUSE_HWHEEL 0x0800
#endif

#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
Expand Down

0 comments on commit c194790

Please sign in to comment.