Hi guys,

i'm trying to build two processes that use same reference of DFB.

my first step was compile linux-fusion (fusion.ko) and dfb with
--enable-multi. after this i create 2 executables. The code fragments of
processes will be showed below:

-- first process --

    DFBSurfaceDescription dsc;
    DirectFBInit (&argc, &argv);
    DirectFBCreate (&dfb);

    dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN);
    dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer);

    dsc.flags = DSDESC_CAPS;
    dsc.caps  = DSCAPS_PRIMARY | DSCAPS_FLIPPING;

    dfb->CreateSurface( dfb, &dsc, &primary );
    primary->GetSize (primary, &screen_width, &screen_height);


-- second process (same code)--

    DFBSurfaceDescription dsc;
    DirectFBInit (&argc, &argv);
    DirectFBCreate (&dfb);

    dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN);
    dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer);

    dsc.flags = DSDESC_CAPS;
    dsc.caps  = DSCAPS_PRIMARY | DSCAPS_FLIPPING;

    dfb->CreateSurface( dfb, &dsc, &primary );
    primary->GetSize (primary, &screen_width, &screen_height);


so i compiled these two codes and executed them. but i think that this way
is incorrect, because to get DFB reference I used DFBInit and to get primary
surface I created it again.

Am I mistaking? or am I rigth?

best regards.
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to