1
0
Fork 0

source/Platform/Win32/Win32Mouse.cpp: in isButtonDown() use SM_SWAPBUTTON to determine if buttons are swapped or not.

This commit is contained in:
Henrik Hautakoski 2020-02-02 18:58:06 +01:00
parent 24fa1e140e
commit eef2690ada
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745

View file

@ -43,8 +43,8 @@ bool Win32Mouse::isButtonDown(Mouse::Button button) const
int btn;
switch(button) {
case Mouse::Left : btn = VK_LBUTTON; break;
case Mouse::Right : btn = VK_RBUTTON; break;
case Mouse::Left : btn = GetSystemMetrics(SM_SWAPBUTTON) ? VK_RBUTTON : VK_LBUTTON; break;
case Mouse::Right : btn = GetSystemMetrics(SM_SWAPBUTTON) ? VK_LBUTTON : VK_RBUTTON; break;
case Mouse::Middle : btn = VK_MBUTTON; break;
case Mouse::Button1 : btn = VK_XBUTTON1; break;
case Mouse::Button2 : btn = VK_XBUTTON2; break;