My code.
No errors - all goes ok.
------------------------------------------------------------
DFBResult dfberr;
if( (dfberr = DirectFBInit( &argc, &argv )) != DFB_OK )
{ DirectFBErrorFatal("DirectFBInit( &argc, &argv )", dfberr); }
IDirectFB * main_interface = NULL;
IDirectFB * main_interface_2 = NULL;
/* 1) */
if( (dfberr = DirectFBCreate( &main_interface )) != DFB_OK )
{ DirectFBErrorFatal( "DirectFBCreate( &main_interface )", dfberr); }
if( (dfberr = DirectFBCreate( &main_interface )) != DFB_OK )
/* 2) */
{ DirectFBErrorFatal( "DirectFBCreate( &main_interface )", dfberr); } */
if( (dfberr = DirectFBCreate( &main_interface_2 )) != DFB_/*if( (dfberr
= main_dfb_interface->SetVideoMode( main_interface, 100, 100, 0 )) !=
DFB_OK ) { fprintf(stderr, "File: %s, Line: %d:\n", __FILE__, __LINE__);
DirectFBErrorFatal( "SetVideoMode( main_interface, 100, 100, 100 )",
dfberr); }*/
OK )
{ DirectFBErrorFatal( "DirectFBCreate( &main_interface_2 )", dfberr); }
if( (dfberr = main_interface->SetCooperativeLevel( main_interface,
DFSCL_FULLSCREEN )) != DFB_OK )
{ DirectFBErrorFatal( "SetCooperativeLevel( main_interface,
DFSCL_FULLSCREEN )", dfberr); }
if( (dfberr = main_interface_2->SetCooperativeLevel( main_interface_2,
DFSCL_FULLSCREEN )) != DFB_OK ) /* 3) */
{ DirectFBErrorFatal( "SetCooperativeLevel( main_interface_2,
DFSCL_FULLSCREEN )", dfberr); }
...
------------------------------------------------------------
Questions.
1. Is it ok to have 2 instances of main interface ? Or may by main
interface is just super interface - and there is nothing wrong to have
multiple instances?
If so, what for may I use multiple instances of super interface?
2. Is it ok to Create main_interface twice (remind no error while
program execution)?
3. In documentation to SetCooperativeLevel is:
"Function fails with DFB_LOCKED if another instance already is in a
cooperative level other than DFSCL_NORMAL."
But my program run with no errors.
So - if it means that one program may have many super instances with
cooperative level set to FULLSCREEN, or EXCLUSIVE,
but if one program has some super interface with cooperative level
set to FULLSCREEN, or EXCLUSIVE this function will fail for another one
program ?
----------------------------------------------------------------------
Ten program odstrasza komary.
Sprawdz >> http://link.interia.pl/f22d9
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users