OS: Arch Linux x86_64
g++: 4.9.2-20141224
SFML: master branch today
Example Code:
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::Window window;
window.create({800, 600, 32}, "SFML");
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
switch(event.type)
{
case sf::Event::MouseButtonPressed:
std::cerr << "Mouse Button Pressed\n";
break;
case sf::Event::MouseButtonReleased:
std::cerr << "Mouse Button Released\n";
break;
default:
break;
}
}
}
return 0;
}
Output:
[alec@alec-desktop-archlinux:~]$ ./a.out
Unable to get joystick attribute. Could not find USB device for joystick at index 0.
Unable to get joystick attribute. Could not find USB device for joystick at index 0.
Unable to get joystick attribute. Could not find USB device for joystick at index 1.
Unable to get joystick attribute. Could not find USB device for joystick at index 1.
Mouse Button Pressed
Mouse Button Pressed
Mouse Button Pressed
Mouse Button Pressed
^C
(Joystick output can be ignored for this post I believe)
So, it's creating two Button Press events per mouse click, rather than one ButtonPress and one ButtonRelease.