[email protected] pisze:
OK.

So - does it means that
super_interface->SetCooperativeLevel( super_interface, DFSCL_FULLSCREEN );
also create surface for primary layer, and Flip() it?
Program works ok if i write (1a).

Does it means that I have to always create _PRIMARY surface, and Flip() it before input handle (everything else)? And if I do not want use this surface should I release it just after Flip(), or at the end of program?

Because if I write this withought X-2:

DirectFBInit( &argc, &argv ); + error check
DirectFBCreate( &super_interface ); + error check

super_interface->SetCooperativeLevel( super_interface, DFSCL_NORMAL ); + error check super_interface->SetVideoMode( super_interface, 720, 720, 32 ); + error check

/*(X-1)*/ IDirectFBSurface * primary_surface = NULL;
         DFBSurfaceDescription primary_surface_description;
         primary_surface_description.flags = DSDESC_CAPS;
primary_surface_description.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; super_interface->CreateSurface( super_interface, &primary_surface_description, &primary_surface ); + error check

         primary_surface->Flip( primary_surface, NULL, 0 ); + error check

/* (X-2)*/ IDirectFBDisplayLayer * osd_layer = NULL;
super_interface->GetDisplayLayer(super_interface, 0, &osd_layer); + error check osd_layer->SetCooperativeLevel( osd_layer, DLSCL_EXCLUSIVE)) != DFB_OK ); + error check
         IDirectFBSurface * osd_surface = NULL;
         osd_layer->GetSurface ( osd_layer, &osd_surface ); + error check

/* (X-3) */ draw something - Yes I see it :-)
         osd_surface->Flip( osd_surface, NULL, 0 ); + error check

/*(X-4)*/  DFBEvent user_input_event;
          IDirectFBEventBuffer * user_input_event_buffer;
super_interface->CreateInputEventBuffer(super_interface, DICAPS_KEYS, DFB_FALSE, &user_input_event_buffer); + error check user_input_event_buffer->WaitForEvent(user_input_event_buffer); + error check user_input_event_buffer->GetEvent( user_input_event_buffer, &user_input_event ); + error check

ten program still hang up in X-4 WaitForEvent(),
and I still need to write X-2 to program work ok.

Regards,
Tomek.




----------------------------------------------------------------------
Nie dla nich ciepla praca za biurkiem.
Sprawdz >>> http://link.interia.pl/f2383

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to