I'm using SFML 2.0-rc, Windows 7, Visual Studio 2010.
Here's my snippet of code:
if (sf::Keyboard::isKeyPressed(sf::Keyboard::W))
{
new_ypos = old_ypos - movespeed;
}
This sits inside the
while (window.pollEvent(event))
.
So, basically when I hold W, my character moves forward for a second, pauses for about 1 second, then W holds down. I know this is the delay in the operating system. The same thing happens when you hold a key on a text document.
Is there any way to get rid of this so that I don't have to wait for that 1 second delay before the character moves continuously,
without changing the OS settings? I know where the OS option is, but I don't want to do this if I want to send the game to other people.
So does SFML have anything, or C++?