Applied formatting & added GetWait().

- GetWait waits for an event in a blocking way.
This commit is contained in:
Sander Schobers 2018-02-10 09:14:19 +01:00
parent 4d98c63391
commit ab5572018d

View File

@ -135,6 +135,12 @@ func (eq *EventQueue) Get() Event {
return eq.mapEvent(&event)
}
func (eq *EventQueue) GetWait() Event {
var event C.ALLEGRO_EVENT
C.al_wait_for_event(eq.queue, &event)
return eq.mapEvent(&event)
}
func (eq *EventQueue) Destroy() {
C.al_destroy_event_queue(eq.queue)
}