Probably because your layer is in "shared" mode.
If layers are "shared" between programs, it is not allowed to change the
configuration.
You should change the level with for instance
IDirectFBDisplayLayer::SetCooperativeLevel() and set it to _EXCLUSIVE.
Note that only one program can have exclusive access at a time! Another
consequence is that if you change the level with program A, then claim
ownership with program B and change the level, this will NOT change
program A configuration; i.e. if you reclaim with program A, it will
automatically switch to A configuration.
hth
Niels
[email protected] wrote:
I have four layers.
First of them is:
layer_id: 0
name: FBDev Primary Layer [OSD]
type :(DLTF_GRAPHICS, )
capabilities :(DLCAPS_SURFACE, DLCAPS_OPACITY, DLCAPS_ALPHACHANNEL,
DLCAPS_SCREEN_LOCATION, DLCAPS_LEVELS, DLCAPS_SCREEN_POSITION,
DLCAPS_SCREEN_SIZE, )
level: 0
regions: 0
sources: 0
clip_regions: 0
My code:
...
/** Setings layers. */
IDirectFBDisplayLayer * osd_layer = NULL;
if( (dfberr = super_interface->GetDisplayLayer(super_interface, 0,
&osd_layer)) != DFB_OK ) { DirectFBErrorFatal( "GetDisplayLayer()",
dfberr); }
int l;
if( (dfberr = osd_layer->GetLevel( osd_layer, &l )) != DFB_OK ) {
DirectFBErrorFatal( "GetLevel()", dfberr); }
printf("%d\n", l );
if( (dfberr = osd_layer->SetLevel( osd_layer, 4 )) != DFB_OK ) {
DirectFBErrorFatal( "SetLevel()", dfberr); }
...
compilation goes ok, and in the last line got message while program
running:
(#) DirectFBError [SetLevel()]: Access denied!
This layer has capability: DLCAPS_LEVELS, so what is wrong ?
----------------------------------------------------------------------
Praca za granicą? Zobacz oferty!
http://link.interia.pl/f2331
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
--
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users