Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: win 7 issue  (Read 862 times)

0 Members and 1 Guest are viewing this topic.

Garlyle

  • Newbie
  • *
  • Posts: 2
    • View Profile
win 7 issue
« on: June 21, 2013, 04:34:53 pm »
I have started programming with SFML 2.0 32 bits version in Visual Studio 2010. For a couple of tries everything worked as it should, but something bothered me: the keyboard.

Event::Keypressed works as it should, but Keyboard::isKeyPressed looks like it had problems - or I thought at first. You see, when I keep the button pressing down, it works the same as with Keypressed, except it detects more keys when I press them. When I press a button, then hold down a second one, and suddenly release the second one, the program doesn't detect that the first button is still down.

I have Windows 7 64 bit, so maybe this is the problem. I tried recreating the keyboard thing with GetAsychKeyState, and it worked the same way as isKeyPressed. Now I was wondering if I compile the thing with the SFML 2.0 64 bits version, does it work the same? Unfortunately after setting the target machine to x64 it still didn't compile. I guess it's problem is that I created a Win32 project, but there is no option to start a Win64 project, so how can I get out of this problem?

Garlyle

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: win 7 issue
« Reply #1 on: June 22, 2013, 08:07:53 am »
Ok, I think I found the problem. I checked the Pong sample, and still it took my a while to figure it out. The isKeyPressed functions were in the while (window.pollEvent(event)){} part, so I put it outside, and now it works as I want.  :-[