Merge pull request #3136 from Cacodemon345/patch-127
qt: Poll for 4th and 5th mouse buttons on Windows
This commit is contained in:
@@ -340,6 +340,16 @@ WindowsRawInputFilter::mouse_handle(PRAWINPUT raw)
|
|||||||
else if (state.usButtonFlags & RI_MOUSE_RIGHT_BUTTON_UP)
|
else if (state.usButtonFlags & RI_MOUSE_RIGHT_BUTTON_UP)
|
||||||
buttons &= ~2;
|
buttons &= ~2;
|
||||||
|
|
||||||
|
if (state.usButtonFlags & RI_MOUSE_BUTTON_4_DOWN)
|
||||||
|
buttons |= 8;
|
||||||
|
else if (state.usButtonFlags & RI_MOUSE_BUTTON_4_UP)
|
||||||
|
buttons &= ~8;
|
||||||
|
|
||||||
|
if (state.usButtonFlags & RI_MOUSE_BUTTON_5_DOWN)
|
||||||
|
buttons |= 16;
|
||||||
|
else if (state.usButtonFlags & RI_MOUSE_BUTTON_5_UP)
|
||||||
|
buttons &= ~16;
|
||||||
|
|
||||||
if (state.usButtonFlags & RI_MOUSE_WHEEL) {
|
if (state.usButtonFlags & RI_MOUSE_WHEEL) {
|
||||||
dwheel += (SHORT) state.usButtonData / 120;
|
dwheel += (SHORT) state.usButtonData / 120;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user