I've ported Ostrich Riders to the latest SFML. When I run it, I get a window saying:
“Ostrich Riders 0.6.1” is not responding.
You may choose to wait a short while for it to continue or force the application to quit entirely.
The program is running fine despite the warning. If you click wait you can continue on your merry way. However, I don't find that acceptable. Does anyone what can be done to prevent this? I tried a simple example for SFML I found online. It too caused the popup. Both functions use sf::RenderWindow::pollEvent. Using sf::RenderWindow::waitEvent doesn't have that problem but the program won't work properly that way. Does anyone know of programs in Fedora using SFML? Do they have this problem?
Hi,
On 08-02-16 14:43, Dennis Payne wrote:
I've ported Ostrich Riders to the latest SFML. When I run it, I get a window saying:
“Ostrich Riders 0.6.1” is not responding.
You may choose to wait a short while for it to continue or force the application to quit entirely.
The program is running fine despite the warning. If you click wait you can continue on your merry way. However, I don't find that acceptable. Does anyone what can be done to prevent this? I tried a simple example for SFML I found online. It too caused the popup. Both functions use sf::RenderWindow::pollEvent. Using sf::RenderWindow::waitEvent doesn't have that problem but the program won't work properly that way. Does anyone know of programs in Fedora using SFML? Do they have this problem?
marsshooter:
http://mars-game.sourceforge.net/
Is in Fedora (and also in Debian), is using SFML-2.3.2 and does not have this problem.
I've not look at which method it is using to poll for events. Can you specify a mask which events to poll for ? Maybe you're not polling for the event which the window-manager uses to determine a window is still alive ?
Or maybe the internal implementations of the 2 are different and only waitEvent contains code to deal with these window-manager events ?
I do wonder why you cannot use waitEvent though, polling sounds like busy waiting which is generally sub-optimal.
Regards,
Hans
I agree. I'd rather use waitEvent but SFML does support that. You have no ability to timeout a waitEvent call and no way to insert an event. In SDL1 btbuilder sets a timer event to trigger and calls waitEvent, but I don't see a way to do that in SFML. It does limit the framerate to 60 fps but there is no indication how that is implemented.
However I think I figured it out. The other sample program I tried isn't generating the warning any more. I was sure it did before but maybe I have some other modification in it. I commented out everything in the game loop but still got warning. Before it gets to the pollEvent call, it loads a bunch of images and sounds. I put in to pollEvent calls in that code. The popup no longer appears. It must have spent too much time between starting the window and getting to the pollEvent.
On Mon, 2016-02-08 at 16:35 +0100, Hans de Goede wrote:
marsshooter:
http://mars-game.sourceforge.net/
Is in Fedora (and also in Debian), is using SFML-2.3.2 and does not have this problem.
I've not look at which method it is using to poll for events. Can you specify a mask which events to poll for ? Maybe you're not polling for the event which the window-manager uses to determine a window is still alive ?
Or maybe the internal implementations of the 2 are different and only waitEvent contains code to deal with these window-manager events ?
I do wonder why you cannot use waitEvent though, polling sounds like busy waiting which is generally sub-optimal.
Regards,
Hans _______________________________________________ games mailing list games@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/games@lists.fedoraproject. org