Re: SFML anyone?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxx
> http://lists.fedoraproject.org/admin/lists/games@lists.fedoraproject.
> org
-- 
Dennis Payne
dulsi@xxxxxxxxxxxxxxxxxxxxx
Roon's Raccoon Sprintladder: https://ideas.lego.com/projects/126010
_______________________________________________
games mailing list
games@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/games@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Music]     [Fedora Extras]     [Kernel]     [Fedora Desktop]     [Fedora Directory]     [PAM]     [CentOS]     [Gimp]     [Yosemite News]     [Yosemite Camping]

  Powered by Linux