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 ]


Elias said :
Well, even if you check if the values make sense, you cannot use the
values of uninitialized variables in a correct program. Just say in the
docs that they should be set to 0 if you don't care about the initial
selection.
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.


Elias said :
Sounds reasonable to change this. In the case of gfx_mode_select, we
probably should document in api._tx that previous write-only parameters
are now read-write (but in a way which can't break anything). Not really
necessary at this point though I guess...
That's totally up to you guys.

Elias said :
Can you post a normal patch against svn? Basically, do something like:

svn diff > gfx_mode.patch

And attach that file. Much easier to read than those 3 files and their
descriptions.
I'm not sure what you mean by a 'normal' patch. I used the CreatePatch context menu option of TortoiseSVN on the most recent SVN version of A4.3.11 to create the gmsf_mod.diff file that I attached. Are you looking for a specific kind of patch, like unified / context / some other kind?

Edgar





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