Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. void
  2. gui_poll(bool active)
  3. {
  4. nsfb_event_t event;
  5. int timeout; /* timeout in miliseconds */
  6. //Render_Agar_GUI();
  7. /* run the scheduler and discover how long to wait for the next event */
  8. timeout = schedule_run();
  9.  
  10. /* if active do not wait for event, return immediately */
  11. if (active)
  12. timeout = 0;
  13.  
  14. /* if redraws are pending do not wait for event, return immediately */
  15. if (fbtk_get_redraw_pending(fbtk))
  16. timeout = 0;
  17.  
  18. if (fbtk_event(fbtk, &event, timeout)) {
  19. if ((event.type == NSFB_EVENT_CONTROL) &&
  20. (event.value.controlcode == NSFB_CONTROL_QUIT))
  21. netsurf_quit = true;
  22. }
  23.  
  24. fbtk_redraw(fbtk);
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement