al_get_next_event
bool al_get_next_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)
Introduced in 5.0.0
Take the next event out of the event queue specified, and copy the contents into ret_event, returning true. The original event will be removed from the queue. If the event queue is empty, return false and the contents of ret_event are unspecified.
See also: ALLEGRO_EVENT, al_peek_next_event, al_wait_for_event
Examples: ex_bitmap_target, ex_dualies, ex_fs_window, ex_glext, ex_membmp, ex_multiwin, ex_opengl, ex_prim, ex_rotate, ex_scale, ex_vsync, ex_winfull
Most helpful discussions:
- Allegro 5.2.2 Setup
- Drawing text slows down FPS dramatically
- Vsync-Dependent Game Loop
- Keyboard event queue not really empty when it should be
- Keyboard input while rendering?
- Advice for game loops with lengthy computations
- Segmentation fault al_map_rgb
- Problem with events
- AGUI Help: Can't load font
- mouse clicks
Other recent discussions:
- [A5.0.10] Critical Issue with Keyboard Locking Up Due to Joystick Event Handling
- Porting from Allegro 4.4 to 5.0
- Would just like some general feedback
- More efficient way to capture mouse position?
- ALLEGRO_RESIZABLE & Mouse Pointer Collision Detection
- I need help
- Allegro Beginner questions
- MacOSX 10.9 al_draw_scaled_bitmap - very slow
- Timers + smart pointers + LLVM vs. G++
- [A5] Event and socket messages ?