Re: [AD] This time GFX_SAFE for real

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


> That sounds fair enough, however many programmers don't use the fbcon mode
> resolution or the safe default resolution.

True, nobody used the safe resolution driver before allegro wips...

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

Ah, don't worry, my patches only touch the framebuffer driver under Linux,
which works only on a console where there are no fancy things like
desktops and multiple graphic applications running at the same time on the
same console.

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

Really interesting idea... You don't :-) I've tried to do this and the
effect is somehow natural: you can change the resolution, and the fbcon
driver keeps assigned the same memory for the application and doesn't
erase the graphic which was being viewed (unlike Windows). However, the
resolution and color depth changes modify the visualization of that
graphic. It's somehow strange, if I start an image viewer and change the
resolution, the view is wrong, and when I exit, the program restores the
original resolution only for that console. Hmmm... it's possibly made by
program.

But no, you aren't supposed to change resolution or color depth at runtime
with the framebuffer. Anyway, I am going to ask the guru's at the fb
mailing list, maybe there's some event sent to applications to notify of
the resolution change.

> 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? 

Only to fbcon (can I hear an "aaaaahhh..."? :-) My patches work only for
fbcon. I just suggested to the other mantainers to change the other
graphic drivers to do similar things, which IIRC don't do know (the X
driver works always at 8bpp and converts things instead of using the
desktop color depth, and windows programs by default switch a full screen
mode, which is not that safe, ignoring the GDI driver). 

I won't be changing them myself because I don't use those environments
anyway, so my vote doesn't count very much there because I don't know
exactly what should well behaved applications do. I only know that using a
framebuffer means having a graphic resolution, and Allegro should take
advantage from this.

This is more critic on systems where there's only a framebuffer, and it
doesn't have a standard resolution, like embedded systems. I know a few
people who have pda's with linux using a framebuffer with weird
resolutions like 180x180 or 600x300 and such. A typical GFX_SAFE driver
would cycle through the "known" resolutions list, never trying to set the
only available graphic mode. There's a relation here with the vesafb,
which seems to allow setting the actual screen resolution, but not
anything else.

> 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!

That was my suggestion. It would be good if we could agree on a
"what-does-this-driver-have-to-do" document.

 Grzegorz Adam Hankiewicz   gradha@xxxxxxxxxx - http://gradha.infierno.org
 Other web pages:  http://glub.ehu.es/  -  http://welcome.to/gogosoftware/



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