I guess I must be doing something wrong, I have tried that, but I still get infinite output if the mouse is held down.
What is wrong with this sample?
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::RenderWindow App(sf::VideoMode(600,600),"Test");
App.EnableKeyRepeat(false);
while( App.IsOpened() )
{
const sf::Input& Input = App.GetInput();
App.GetInput().GetMouseX(), App.GetInput().GetMouseY();
sf::Event Event;
while( App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
}
if( Input.IsMouseButtonDown(sf::Mouse::Left) )
std::cout << "left" << std::endl;
App.Display();
}
std::cout << "DONE" << std::endl;
}