Re: [AD] Update for gfx_mode_select/ex/filter behavior for A4.3.11+

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


On Wed, 2009-03-04 at 14:27 -0600, Edgar wrote:
> Elias said :
> > Mostly, all changes should be in one file, not three separate files. I
> > was really confused what I'm looking at when I tried to parse those
> > files... so instead of explaining what is what, just *one* patch with
> > the changes and it will be fine, without any further explanations.
> There is just one patch though - gmsf_mod.diff contains all the changes 
> made to both allegro._tx and modesel.c. I only attached the other two 
> files so the full replacements for the corresponding functions and 
> documentation could be seen in their entirety. Sorry if I didn't explain 
> that well.

I see now. The full replacements can be seen anyway after applying the
patch, so no need to attach them :)

I still think the docs need to be changed to make more clear that you
must not pass pointers to uninitialized variables in any of the three
functions now (and a note saying so for the first one should be added to
api._tx, as that is a change slightly breaking compatibility - valgrind
will now warn on code which was perfectly fine before and such code
therefore should be updated when upgrading).


> I thought about all the ways that specific values could be used to 
> indicate to the function to just default to the first entry, and using
> a 
> starting value of zero at the addresses for w, h, and color_depth
> would 
> work fine, but I would have to invent a new value for the card
> parameter 
> because GFX_AUTODETECT is defined to zero, and using GFX_NONE as the 
> default indicator value for card would cause conflicts when the
> function 
> encounters an error or the filter function filters out all of the
> modes 
> because gfx_mode_select_filter sets *card equal to GFX_NONE for both
> of 
> those cases. I figured it would just be easier if there were no
> values 
> to remember to set the variables to first, and if the users don't
> want 
> to initialize their variables it still wouldn't hurt anything, only 
> perhaps give some peculiar (but safe) settings to the starting 
> selections in rare cases.

I don't understand - what kind of conflict with GFX_AUTODETECT would
occur?

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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