Re: [AD] Setup broken in CVS..?

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


Peter Wang <tjaden@xxxxxxxxxx> wrote:
> > > The setup utility of the CVS version seems to be broken. If I click on a
> > > button, then its function executes correctly; however, once the function
> > > is finished, it is executed again and again and...
> 
>                 The problem appears to be the MSG_END patch (the
> latest change to gui.c).  I haven't tried to figure out which part
> of setup it breaks yet, but it's probably in update() somewhere.

In setup.c:747,

      ret = update_dialog(d->player);

when `ret' is `FALSE', `setup' depends on `d->player->res' being 0.
With the MSG_END patch, it is 1 (`D_CLOSE').

As the docs state:

"int update_dialog(DIALOG_PLAYER *player);
    Updates the status of a dialog object returned by init_dialog().
    Returns TRUE if the dialog is still active, or FALSE if it has
    terminated. Upon a return value of FALSE, it is up to you
    whether to call shutdown_dialog() or to continue execution."

... the user is free to continue execution with `update_dialog' as
many times as desired.  I think this implies that `player->res'
should be clear when `update_dialog' returns `FALSE' (i.e. it should
not retain state after the dialog is terminated, since it might be
reused without reinitialisation).

David, since your patch depends on having the `D_CLOSE' flag set
after returning from `update_dialog', I have removed it from CVS.
You can try another approach if you like.

-- 
tjaden@xxxxxxxxxx - http://www.psynet.net/tjaden/
Weight Watchers will meet at 7 PM at the First Presbyterian Church.
Please use large double door at the side entrance.



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