Re: [AD] Runtime Gfx Mode Info - Submission for A4.3.11+

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


2009/2/13 Edgar <edgarreynaldo@xxxxxxxxxx>:
> I've written some functions for Allegro that can be used to determine the
> graphics mode type of arbitrary graphics drivers at runtime. These could
> help a programmer determine which of a set of drivers that they would like
> to allow their users to pick from for choosing a graphics mode to run the
> program in.
>
> I posted a thread giving more details about it on allegro.cc, along with a
> static Windows program demonstrating their usefulness  :
> http://www.allegro.cc/forums/thread/599169
>
> The functions are useful when used in conjunction with the
> gfx_mode_select_filter function, and could be helpful for limiting config
> settings if so desired.
>
> I made a patch against the latest SVN version of Allegro 4.3.11+ and
> attached it to this message.
>
> Let me know if this is acceptable, if there are any things you would like to
> see changed, etc... Are the naming conventions acceptable? I think they
> might be better named as "is_*_mode" functions instead of "is_a_*_mode"
> functions, but that would require renaming the current "is_windowed_mode"
> function to "in_windowed_mode" instead, which makes more sense to me since
> it refers to the currently set mode instead of an arbitrary one. I will
> update the patch to include the changes if that is more favorable.

The is_a_* functions definitely sound wrong.  Maybe change them to
gfx_mode_is_*?

I don't think so many functions are required.  You should be able to call
one function to tell you both whether a mode is windowed or fullscreen, and
whether that's definite.  I'm not sure there's any need for is_a_magic_mode().

current_gfx_mode may be better named as get_gfx_mode to parallel set_gfx_mode.

Peter

PS. Stick to Allegro formatting conventions.




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