Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Interrupt based project  (Read 1798 times)

0 Members and 1 Guest are viewing this topic.

barnack

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Interrupt based project
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Interrupt based project
« Reply #1 on: March 12, 2018, 07:30:38 am »
You can use waitEvent().
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

barnack

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: Interrupt based project
« Reply #2 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!