diff --git a/src/SFML/Window/Win32/InputImpl.cpp b/src/SFML/Window/Win32/InputImpl.cpp index 66cbc59e..4dbd37fc 100644 --- a/src/SFML/Window/Win32/InputImpl.cpp +++ b/src/SFML/Window/Win32/InputImpl.cpp @@ -162,12 +162,12 @@ bool InputImpl::isMouseButtonPressed(Mouse::Button button) int vkey = 0; switch (button) { - default: vkey = 0; break; - case Mouse::Left: vkey = VK_LBUTTON; break; - case Mouse::Right: vkey = VK_RBUTTON; break; + case Mouse::Left: vkey = GetSystemMetrics(SM_SWAPBUTTON) ? VK_RBUTTON : VK_LBUTTON; break; + case Mouse::Right: vkey = GetSystemMetrics(SM_SWAPBUTTON) ? VK_LBUTTON : VK_RBUTTON; break; case Mouse::Middle: vkey = VK_MBUTTON; break; case Mouse::XButton1: vkey = VK_XBUTTON1; break; case Mouse::XButton2: vkey = VK_XBUTTON2; break; + default: vkey = 0; break; } return (GetAsyncKeyState(vkey) & 0x8000) != 0;