Differences From Artifact [84dbf1da64]:
- File
src/OGKEventQueue.m
— part of check-in
[4719f25709]
at
2012-08-26 12:17:52
on branch trunk
— Only call al_*_destroy if Allegro is initialized.
Otherwise, it would crash if al_uinstall_system() has already been
called. Handling it this way eliminates the need to dealloc all objects
before calling al_uninstall_system(), which meant that it was the users
repsonsibility to call al_uninstall_system() after the user made sure
all objects are deallocated. Now the user does not get to see any
al_*() function. (user: js, size: 5851) [annotate] [blame] [check-ins using]
To Artifact [9c06e7380d]:
- File src/OGKEventQueue.m — part of check-in [d49c4b05b0] at 2012-08-26 13:42:00 on branch trunk — Rename -[handleNextEvent] -> -[handleEvents]. (user: js, size: 5848) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
49 50 51 52 53 54 55 | - (void)dealloc { if (al_is_system_installed()) al_destroy_event_queue(eventQueue); } | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - (void)dealloc { if (al_is_system_installed()) al_destroy_event_queue(eventQueue); } - (void)handleEvents { OGKEvent *event = [[OGKEvent alloc] init]; ALLEGRO_EVENT *allegroEvent = [event OGK_allegroEvent]; while (al_get_next_event(eventQueue, allegroEvent)) { switch (allegroEvent->type) { case ALLEGRO_EVENT_DISPLAY_CLOSE: |
︙ | ︙ |