Re: [AD] This time GFX_SAFE for real

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



Mike Fahlbusch wrote:
[snip]
> That sounds fair enough, however many programmers don't use the fbcon mode
> resolution or the safe default resolution.

In that case, the old GFX_SAFE behavior (change the mode to something
safe) is used.
Btw Grzegorz, do your modifications apply to (X) Windows too, or just
fbcon?

>  A program that runs under DOS,
> MS Windows and Linux X may need to start up in full screen mode on one
> platform and as a 100 x 100 window on another computer.


I can't speak for X (don't use it), but for Windows and DOS, Allegro
just picks whatever is guarentied to work. In DOS, that's 320x200x8. In
Windows, it's 640x480x8. All (S)VGA shoud be able to do that. That way,
all Allegro requires for graphics is a VGA card (SVGA for Windows). If
you want to do anything else, like windowed mode, or other color depths,
then you must do so explicitly. GFX_SAFE is only there as a fail safe,
work-on-this-system-or-not-at-all graphics mode.


> The full screen
> mode resolution and color depth could be randomly changed by the user.  I
> use a screen res of 640x480 in DOS, 800x600 in MSW and 1024x768 in Linux.

DOS runs in text mode. If you switch to graphics mode, then Allegro will
just switch back to 320x200x8 regardless, as it's known to work in DOS.
Second, you can't expect DOS to be runned in gfx mode (I think it's
detectable though...uhm...I wonder). In Windows, then 640x480x8 is a
minimum requirement for DirectDraw (3?) compliance. If the video card
can't even do that, then DDraw wouldn't even work.


On a side note, shouldn't GFX_SAFE in Windows open a window (GDI mode)?
It's safer than switching modes, I agree. At least, we can get a
consistant definition of GFX_SAFE!


> But the allegro program I am writing starts up using GFX_SAFE to make the
> program appear on top and in focus, then changes to 600x350 window size.

Shouldn't it be 640x480? In any case if it's in a window, then you can
minimize it, no?


> The last thing I need is my program filling the whole screen and somehow
> locking the user out of the desktop.

Not in Windows; you can always alt+tab out. I don't know how this works
in X.

>  And what if the user changes the
> color depth, making all of the colors change at random?

At run-time? I dunno if fbcon can even do that. As for X, well I don't
know. If it's full screen Windows, then there's no problem (you'll just
be switching in between know-o-work modes). If it's windowed-Windows,
well, I dunno how that works either, but I suppose there are mechanisms
for it.


--

- Robert J Ohannessian



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