Win32: Allow right mouse button to be bound to anything.

This commit is contained in:
The Dax committed 2013-08-19 07:05:32 -04:00
1 parent 61d2042083
commit 4f76c3f4fb
2 files changed
+19 -1

No files matched your search

+16
View File
@@ -1122,6 +1122,22 @@ namespace MainWindow
mouseDeltaX += raw->data.mouse.lLastX;
mouseDeltaY += raw->data.mouse.lLastY;
KeyInput key;
key.deviceId = DEVICE_ID_MOUSE;
bool mouseRightBtnPressed = raw->data.mouse.usButtonFlags & RI_MOUSE_RIGHT_BUTTON_DOWN != 0;
if(mouseRightBtnPressed) {
key.flags = KEY_DOWN;
key.keyCode = windowsTransTable[VK_RBUTTON];
NativeKey(key);
}
else {
key.flags = KEY_UP;
key.keyCode = windowsTransTable[VK_RBUTTON];
NativeKey(key);
}
// TODO : Smooth and translate to an axis every frame.
// NativeAxis()
}