SFML community forums

Help => General => Topic started by: barnack on March 12, 2018, 12:46:05 am

Title: Interrupt based project
Post by: barnack on March 12, 2018, 12:46:05 am
Greetings,
is it possible (and if so is there any example of) to make an interrupt based project with sfml rather than a polling based one? For some multimedia software (non-necessairly-games) having a fixed step loop is already bad enough. For example if i make a photo viewer, i really have no reason whatsoever to update anything in the window until there's a mouse click or a key press.
Title: Re: Interrupt based project
Post by: eXpl0it3r on March 12, 2018, 07:30:38 am
You can use waitEvent().
Title: Re: Interrupt based project
Post by: barnack on March 12, 2018, 12:42:56 pm
Oh that's perfect! Couldn't find it immediately...
I just noticed it was mentioned in the "events explained" page, i just missed it for some reason, thanks!