DirectFB - Home of the pragmatist Roadmap

[directfb-dev] Re: how to CreateSurface on CRTC2 layer for G400
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-dev] Re: how to CreateSurface on CRTC2 layer for G400

On Sun, Dec 15, 2002 at 06:31:32PM +0200, Ville Syrjälä wrote:
> On Sun, Dec 15, 2002 at 10:46:06AM -0500, wrote:

Just an update.  I did get SDL to work on the 2nd head in NTSC TV
mode!  Thanx to all the help from Ville.

> > P.S.  With this being the 2nd graphics layer I have had to hack to be
> > able to use CRTC2 instead of DLID_PRIMARY, have any ideas about how to
> > make this sort of thing user-selectable been thought up?  I guess a
> > new /etc/directfbrc option could be introduced to specify the layer
> > you want to work on.
> A small change to IDirectFB_Construct() would do the trick I think. At
> least apps depending on EnumVideoModes() returning something useful will
> fail. There might be other problems too.
> I don't have time to go through the code right now so I'm not sure if it
> actually works. Can you try hardcoding the layer in IDirectFB_Construct()
> in idirectfb.c?
> - data->layer = dfb_layer_at( DLID_PRIMARY );
> + data->layer = dfb_layer_at( 2 );

OK.  I will try this, but I am not sure it answers my question.  Or
maybe I am just misuderstanding the answer.  Assume I have a computer
with DirectFB installed and a G400 inside.  I have a monitor on the
first head and a television on the second head.

Now I have several directfb apps that I want to run.  Let's say I want
to run an SDL game on the first head and a GTK "set-top" type TV
application on the second head.  Given the ability from DirectFB, both
of these apps should be flexible and could be used on either head,
depending on the tastes of the particular user.

What is the proposal as to how a user can specify where he wants his
app displayed?  Usually with a dual head set-up there is /dev/fb0 and
/dev/fb1 that the user can use to distinguish where to display the
app.  But with a G400 using the new CRTC2 code, there is no /dev/fb1
anymore, correct?  It's just different layers of /dev/fb0.

Should the layer to use be selectable by the user somehow?
Additionally, not all layers are size configurable.  The CRTC2 layer
when using a TV mode has a set size.  Applications being developed for
use with DirectFB need to be aware of this and not try to set the size
of a layer that cannot be changed.

I guess, where this is all going, is I have hacked SDL to use layer 2
so that it displays on the TV (as I did with GTK).  But I want the SDL
folks to recognize being able to display on different layers is
important, and that trying to create surfaces on some layers may not
always work (as this thread has revealed).  But when I tell them that
the user will want to be able to specify which layer he wants to use,
how do they code up SDL to take this option and deal with it?


Brian J. Murrell

Attachment: pgp00013.pgp
Description: PGP signature

Home | Main Index | Thread Index / Development / Old Archives