[AD] About al_get_current_display and al_show_native_message_box

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


Hello,

One question, can we use "al_get_current_display" before calling "al_init"
or even if "al_init" fails? If we can, the following patch could be applied to
"examples/common.c" to avoid problems showing a message box
behinds the current display (e.g. in "ex_joystick_events.c" when we
don't have a joystick).

If we cannot, I think "al_get_current_display" should support calls
before "al_init". So the examples (and any game) can use
"al_show_native_message_box" with "al_get_current_display"
without worrying about if "al_init" has failed or not.

As in "common.c" is said the other option is to remove the display
parameter from "al_show_native_message_box". But I think it is
just a bad idea.

Another detail: I think "native_dialog.txt" should say that those
functions can be called even if "al_init" was failed or was not
called yet (e.g. "examples" use "al_show_native_message_box"
to show an error when "al_init" fails).

Attachment: common.diff
Description: Binary data



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