Hi,

I just try to switch between text and graphics as follows:

turning on graphics:

    DFBSurfaceDescription dsc;

    DirectFBCreate(&dfb);
    dfb->SetCooperativeLevel(dfb, DFSCL_FULLSCREEN);
    dfb->CreateEventBuffer(dfb, DICAPS_KEYS, &eventbuffer);

    dsc.flags = DSDESC_CAPS;
    dsc.caps = DSCAPS_PRIMARY;
    dfb->CreateSurface(dfb, &dsc, &primary);

turning off graphics:

    if (eventbuffer) {
        eventbuffer->WaitForEvent(eventbuffer);
        eventbuffer->Reset(eventbuffer);
        eventbuffer->Release(eventbuffer);
        eventbuffer = (IDirectFBEventBuffer*)0;
    }
    if (primary) {
        primary->Release(primary);
        primary = (IDirectFBSurface*)0;
    }
    if (dfb) {
        dfb->Release(dfb);
        dfb = (IDirectFB*)0;
    }

I can't use Suspend / Resume because libdirectfb is dlopened by my
program and might be unloaded after turning off graphics.

This works the first time, but when switching off graphics I get:

    (!) keyboard thread died
        --> Interrupted system call

If I turn on graphics again, the function SetCooperativeLevel() fails with

dfb.c <161>:
        (#) DirectFBError [dfb->SetCooperativeLevel(dfb, DFSCL_FULLSCREEN)]: Interface 
is dead!

what's the problem?

-- 
   Johannes


-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to