mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 12:51:05 +08:00
Fixed sf::Mouse::IsButtonPressed and sf::Keyboard::IsKeyPressed incorrectly returning true on Windows
This commit is contained in:
parent
7f390367f1
commit
c51e22cb52
@ -145,7 +145,7 @@ bool InputImpl::IsKeyPressed(Keyboard::Key key)
|
||||
case Keyboard::Pause: vkey = VK_PAUSE; break;
|
||||
}
|
||||
|
||||
return GetAsyncKeyState(vkey) != 0;
|
||||
return (GetAsyncKeyState(vkey) & 0x8000) != 0;
|
||||
}
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ bool InputImpl::IsMouseButtonPressed(Mouse::Button button)
|
||||
case Mouse::XButton2: vkey = VK_XBUTTON2; break;
|
||||
}
|
||||
|
||||
return GetAsyncKeyState(vkey) != 0;
|
||||
return (GetAsyncKeyState(vkey) & 0x8000) != 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user