hey I was about to post the same thing!
I use SFML 1.5, .deb package downloaded with Synaptic on Ubuntu 9.10.
I've got an XBox 360 (wired) Gamepad connected and no window would show up. It turned out that it never left the GetEvent-loop.
So I added debug output for every Event. Well, it turned out that...
Event: JoyMoved: 0 - 4.43434
Event: JoyMoved: 0 - -0.601215
Event: JoyMoved: 0 - -100
Event: JoyMoved: 0 - 14.2369
Event: JoyMoved: 0 - -100
Event: JoyMoved: 0 - 100
Event: JoyMoved: 0 - 0
Event: JoyMoved: 0 - 0.1
Event: JoyButtonPressed: 0 - 34
Event: JoyButtonPressed: 0 - 35
Event: JoyButtonPressed: 0 - 37
Event: JoyButtonPressed: 0 - 38
Event: JoyButtonPressed: 0 - 39
Event: JoyMoved: 0 - 4.43434
Event: JoyMoved: 0 - -0.601215
Event: JoyMoved: 0 - -100
Event: JoyMoved: 0 - 14.2369
Event: JoyMoved: 0 - -100
Event: JoyMoved: 0 - 100
Event: JoyMoved: 0 - 0
Event: JoyMoved: 0 - 0.1
Event: JoyButtonPressed: 0 - 34
Event: JoyButtonPressed: 0 - 35
Event: JoyButtonPressed: 0 - 37
Event: JoyButtonPressed: 0 - 38
Event: JoyButtonPressed: 0 - 39
...
you get the idea
And apparently that happens faster than it can be popped from the stack.
I tried removing the gamepad (didn't restart though), resulting in a slightly different output:
Event: JoyMoved: 0 - 0
Event: JoyMoved: 0 - 0
Event: JoyMoved: 0 - 0.1
Event: JoyButtonReleased: 0 - 32
Event: JoyButtonReleased: 0 - 33
Event: JoyButtonReleased: 0 - 36
Event: JoyMoved: 0 - 0
Event: JoyMoved: 0 - 0
Event: JoyMoved: 0 - 0.1
Event: JoyButtonReleased: 0 - 32
Event: JoyButtonReleased: 0 - 33
Event: JoyButtonReleased: 0 - 36
(Btw there's no output for the Joy::Axis because I was too lazy to look that up - it's not in the doc.)
Well, as a workaround I counted the events received and stopped on 1000 per frame - that way it ran smoothly.
So I started wondering just how many Events there could possibly be... I tried this (I really love the simplicity of SFML - nice work!):
sf::Clock WatchDogTimer;
while(App.GetEvent(Event))
{
++count;
if(WatchDogTimer.GetElapsedTime() > 1.0)
{
std::cout<<"Event-Overflow: more than 1 second of events per frame. ("<<count<<" events received)"<<std::endl;
break;
}
Well, it turned out I got
3 million Events per second! (SFML sure is fast
)
I don't know if this is a Ubuntu- or an SFML-related problem but it sure is annoying.
P.S.: AM/PM time style is funny - 11:25PM is after 12:39PM