Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualchondee

Posted 18 January 2012 - 03:31 AM

So, I have built the SFML 2.0 libraries, and converted my code for SFML 2.0.
There was quite a huge performance gain, everything looked fine, so I started writing the keyboard input functions.

I am polling for events in the main loop, every frame like this:
  while (App.PollEvent (Event))
  {
   //myWorld.myPlayer.handle_input();
   //if (Event.Type == sf::Event::Closed)
   //{
   // App.Close();
   //}
  }
Even if the loop is empty, like above,  the performance drops significantly, the frame rate fluctuates between 20-60.
Am I doing the polling wrong?

EDIT:
SOLVED
I got the answer on SFML forums

Can you try to comment line 121 of src/SFML/Window/WindowImpl.cpp (ProcessJoystickEvents();) and recompile SFML?


#1chondee

Posted 18 January 2012 - 03:12 AM

So, I have built the SFML 2.0 libraries, and converted my code for SFML 2.0.
There was quite a huge performance gain, everything looked fine, so I started writing the keyboard input functions.

I am polling for events in the main loop, every frame like this:
  while (App.PollEvent (Event))
  {
   //myWorld.myPlayer.handle_input();
   //if (Event.Type == sf::Event::Closed)
   //{
   // App.Close();
   //}
  }
Even if the loop is empty, like above,  the performance drops significantly, the frame rate fluctuates between 20-60.
Am I doing the polling wrong?

PARTNERS