[AD] Fullscreen/windowed mode autodetection |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Here's a patch that adds support for two new autodetection driver ids: GFX_AUTODETECT_FULLSCREEN and GFX_AUTODETECT_WINDOWED. Some time ago we discussed about the fullscreen/windowed autodetection issue; well, the best suggestion for me was Peter's one, so I implemented it now that I finally had some free time. GFX_AUTODETECT_FULLSCREEN attempts to locate a driver that will run only fullscreen, and will fail if it cannot be found. GFX_AUTODETECT_WINDOWED is the same, but will always give you a windowed mode, failing if that is not available (in DOS this should always fail!) GFX_AUTODETECT works the same as before, i.e. it looks for the first suitable driver for specified screen size and color depth, no matter if windowed or fullscreen. This patch modifies the GFX_DRIVER structure, adding a "windowed" flag. I've also updated all the Allegro gfx drivers due to this change (only the Mac DrawSprockets was not updated AFAIK; could you do it please? I forgot it), and I've modified the mode selector dialog to list the two new fake drivers. The patch requires the X11 fullscreen driver patch to be previously applied, so be warned! Some more things: I've modified the X gfx driver names a bit, so now they're listed in order in the mode selector dialog; I also had to name the old X-Windows driver to "X11 window" and "X11 fullscreen", because "X-Window fullscreen" for example was too long for the dialog... Due to the new fullscreen X driver, I also thought that writing "[...] 16 bit window" things in the driver desc was not correct at all anymore, so I modified that "window" in "real depth". The patch also modifies X fullscreen window and viewport placement to coordinates 0,0. The new fullscreen driver works nicely: I never saw window borders, and the mouse is always grabbed (haven't yet tried to switch workspace though) About Allegro crashing after a few mode switches, this happens also if you never use the new X11 fullscreen driver, so the problem is not there; gdb told me the it is on _xwin_write_line()... Could it be that this is another gcc optimization bug?? I have the infamous Mandrake 7.2 installed... (can't wait to get the 8.0, and I hope they fixed the problems!) -- Angelo Mottola a.mottola@xxxxxxxxxx http://www.ecplusplus.com PS: I made the DGA 1 fake windowed driver to be detected as a windowed driver... I don't know if this is the right thing to do, but it seems reasonable to me; what do you think? PPS: Am I the only one having problems autodetecting DGA 2? That is autodetected only if using the same color depth as the desktop, but if you directly specify the driver, it'll work with any color depth... Really strange!
Attachment:
gfxmode.diff.gz
Description: GNU Zip compressed data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |