[AD] al_acknowledge_display_disconnected

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Is this a horrible idea? We need this function, but there's a catch. I first implemented it as a plain void function for testing with some global booleans. It worked, then I went to do it properly. Put a vtable entry in (acknowledge_display_disconnected(ALLEGRO_DISPLAY *)) and the main library function as the subject says, also taking an ALLEGRO_DISPLAY.

The problem is, the display has to be destroyed. And it has to be destroyed before the work is done in al_acknowledge_display_disconnected. But you can't destroy the display in user code, and then call vtable entries in that display. So what I did was make said function destroy the display itself. There may be better options though. It seems a little bit wrong for it to destroy the display, even if it's well documented. Not sure why I feel that way. But it works well, so I don't know. Any better ideas?

Thanks,
Trent



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/