Add option for 5-button PS/2 mouse

This commit is contained in:
Cacodemon345
2022-10-28 23:51:38 +06:00
parent e5268075fb
commit b388cb552f
3 changed files with 67 additions and 19 deletions

View File

@@ -81,6 +81,16 @@ win_mouse_handle(PRAWINPUT raw)
else if (state.usButtonFlags & RI_MOUSE_RIGHT_BUTTON_UP)
mousestate.buttons &= ~2;
if (state.usButtonFlags & RI_MOUSE_BUTTON_4_DOWN)
mousestate.buttons |= 8;
else if (state.usButtonFlags & RI_MOUSE_BUTTON_4_UP)
mousestate.buttons &= ~8;
if (state.usButtonFlags & RI_MOUSE_BUTTON_5_DOWN)
mousestate.buttons |= 16;
else if (state.usButtonFlags & RI_MOUSE_BUTTON_5_UP)
mousestate.buttons &= ~16;
if (state.usButtonFlags & RI_MOUSE_WHEEL) {
mousestate.dwheel += (SHORT) state.usButtonData / 120;
}