sf::Mouse::isButtonPressed nows uses logical buttons
This commit is contained in:
parent
18f1b6263a
commit
04620b9f2f
@ -162,12 +162,12 @@ bool InputImpl::isMouseButtonPressed(Mouse::Button button)
|
|||||||
int vkey = 0;
|
int vkey = 0;
|
||||||
switch (button)
|
switch (button)
|
||||||
{
|
{
|
||||||
default: vkey = 0; break;
|
case Mouse::Left: vkey = GetSystemMetrics(SM_SWAPBUTTON) ? VK_RBUTTON : VK_LBUTTON; break;
|
||||||
case Mouse::Left: vkey = VK_LBUTTON; break;
|
case Mouse::Right: vkey = GetSystemMetrics(SM_SWAPBUTTON) ? VK_LBUTTON : VK_RBUTTON; break;
|
||||||
case Mouse::Right: vkey = VK_RBUTTON; break;
|
|
||||||
case Mouse::Middle: vkey = VK_MBUTTON; break;
|
case Mouse::Middle: vkey = VK_MBUTTON; break;
|
||||||
case Mouse::XButton1: vkey = VK_XBUTTON1; break;
|
case Mouse::XButton1: vkey = VK_XBUTTON1; break;
|
||||||
case Mouse::XButton2: vkey = VK_XBUTTON2; break;
|
case Mouse::XButton2: vkey = VK_XBUTTON2; break;
|
||||||
|
default: vkey = 0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (GetAsyncKeyState(vkey) & 0x8000) != 0;
|
return (GetAsyncKeyState(vkey) & 0x8000) != 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user