al_wait_for_event_until
bool al_wait_for_event_until(ALLEGRO_EVENT_QUEUE *queue,
ALLEGRO_EVENT *ret_event, ALLEGRO_TIMEOUT *timeout)
Introduced in 5.0.0
Wait until the event queue specified is non-empty. If ret_event
is not NULL, the first event in the queue will be copied into ret_event
and removed from the queue. If ret_event
is NULL the first event is left at the head of the queue.
timeout
determines how long to wait. If the call times out, false is returned. Otherwise true is returned.
See also: ALLEGRO_EVENT, ALLEGRO_TIMEOUT, al_init_timeout, al_wait_for_event, al_wait_for_event_timed
Examples: ex_timedwait
Most helpful discussions:
- Implementing game loop (1)
- How do I return a boolean instead of locking up the process?
- Question about ALLEGRO_EVENT_KEY_CHAR
- Did I skip something?
- event loop best practice
- Problem in Allegro 5.2.4 Timer!
- Audio seems overly complicated :(
- Controlling threads
- two options for display close
- Weird issue with font, can anybody help?
Other recent discussions:
- Mouse bitmap
- Porting from Allegro 4.4 to 5.0
- Keyboard input trought allegro
- Segmentation fault error after calling a function
- Getting user input in allegro 5
- Problem with game loop
- Multiple event queues
- Timing and Bitmap Troubles
- Loading and draw images
- Question on increasing "render" speed