Re: [AD] set_gfx_mode() rewrite |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Allegro Developers list <conductors@xxxxxxxxxx>
- Subject: Re: [AD] set_gfx_mode() rewrite
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Sun, 6 Oct 2002 12:10:55 +0200
- Organization: University of Amsterdam
> The attached patch is an attempt to (partially) rewrite the infamous
> set_gfx_mode(). It builds upon the previous cleanup work (by Evert IIRC)
and
> factors out more duplicated code. It also aims at making it easier to
follow
> the flow-of-control.
Following up on Eric's followup, I've added a gfx_cardf config string. With
this addition, GFX_AUTODETECT_WINDOWED and GFX_AUTODETECT_FULLSCREEN are
treated more symmetrically.
With the recent addition of -windowed and -fullscreen flags to the grabber,
this makes sense IMHO.
Are there any plans to update the setup program to allow the user to select
the graphics driver? If not, I'll add it to my personal todo list, but I'm
eager to continue with the grabber first.
*** allegro-cvs/src/graphics.c.old Sun Oct 6 11:35:47 2002
--- allegro-cvs/src/graphics.c Sun Oct 6 11:38:41 2002
***************
*** 721,727 ****
if (flags & GFX_DRIVER_WINDOWED_FLAG)
found = get_config_gfx_driver(uconvert_ascii("gfx_cardw", tmp), w, h, v_w, v_h, flags, driver_list);
! /* try the gfx_card variable if gfx_cardw wasn't used */
if (!found)
found = get_config_gfx_driver(uconvert_ascii("gfx_card", tmp), w, h, v_w, v_h, flags, driver_list);
}
--- 721,731 ----
if (flags & GFX_DRIVER_WINDOWED_FLAG)
found = get_config_gfx_driver(uconvert_ascii("gfx_cardw", tmp), w, h, v_w, v_h, flags, driver_list);
! /* try the gfx_cardf variable if GFX_AUTODETECT_FULLSCREEN was selected */
! if (flags & GFX_DRIVER_FULLSCREEN_FLAG)
! found = get_config_gfx_driver(uconvert_ascii("gfx_cardf", tmp), w, h, v_w, v_h, flags, driver_list);
!
! /* try the gfx_card variable if gfx_cardw & gfx_cardf weren't used */
if (!found)
found = get_config_gfx_driver(uconvert_ascii("gfx_card", tmp), w, h, v_w, v_h, flags, driver_list);
}
*** allegro-cvs/docs/src/allegro._tx.old Sun Oct 6 11:42:24 2002
--- allegro-cvs/docs/src/allegro._tx Sun Oct 6 11:43:01 2002
***************
*** 1378,1383 ****
--- 1378,1389 ----
gfx_card in all other respects. If it is not set, Allegro will look
for the gfx_card variable.
<li>
+ gfx_cardf = x<br>
+ Specifies which graphics driver to use when the program requests
+ GFX_AUTODETECT_FULLSCREEN. This variable functions exactly like
+ gfx_card in all other respects. If it is not set, Allegro will look
+ for the gfx_card variable.
+ <li>
vbeaf_driver = x<br>
DOS and Linux only: specifies where to look for the VBE/AF driver
(vbeaf.drv). If this variable is not set, Allegro will look in the same