I can now say that my code also works with DFB 1.2.8 (not just 1.0.1)
under otherwise identical conditions, including build tools. So, the
question is:

What has changed from 1.2.8 to 1.4.0 that could lead to DFB_INVARG on
calls to IDirectFBInputDevice.AttachEventBuffer(). The same thing
happens when I call IDirectFBInputDevice.GetXY(), as I now know. It
works fine with 1.2 or below, but leads to DFB_INVARG with 1.4.

Were any changes made to compiler/linker options which could cause
pointers passed from external non-C libs to be NULL? It would have to be
something exotic, because my bindings are set to use C calling
convention, of course, and that usually works.

Any suggestion is highly appreciated, I am really wasting a lot of time
on this.
Thanks -RS

> --- Problem I -----------------
> 
> 
> With the libs at 1.0.1, this used to work fine (translated from Pascal):
> 
>   IDirectFB *Dfb = NULL;
>   IDirectFBInputDevice *Keyboard = NULL;
>   IDirectFBEventBuffer *EventBuffer = NULL;
> ...
>   Dfb->GetInputDevice(Dfb, DIDID_KEYBOARD, &Keyboard);
>   Dfb->CreateEventBuffer(Dfb, &EventBuffer);
>   Keyboard->AttachEventBuffer(Keyboard,EventBuffer);
> 
> and also this:
> 
>   IDirectFB *Dfb = NULL;
>   IDirectFBInputDevice *Keyboard = NULL;
>   IDirectFBEventBuffer *EventBuffer = NULL;
> ...
>   Dfb->GetInputDevice(Dfb, DIDID_KEYBOARD, &Keyboard);
>   Keyboard->CreateEventBuffer(Keyboard, &EventBuffer);
> 
> But now (with binaries at 1.4) I get DFB_OK from Dfb->GetInputDevice()
> and from Dfb->CreateEventBuffer(). However, then I get an unknown error
> code 0x0000000E when I attach the buffer. I get DFB_INVARG when I use
> Keyboard->CreateEventBuffer().
> 
> 
> --- Problem II (related) -----------------
> 
> 
> One way I *can* get input handling running is this, without explicitly
> getting a device at all:
> 
>   Dfb->CreateInputEventBuffer(Dfb,DICAPS_ALL, DFB_TRUE, &EventBuffer);
> 
> But then, if I do
> 
>   EventBuffer->WaitForEvent(EventBuffer);
>   EventBuffer->GetEvent(EventBuffer,&Event);
> 
> I get back Event.type correctly. But when I then check Event.key_code
> (on DIET_KEYPRESS), I get garbage. For Event.button (on
> DIET_BUTTONPRESS), I always get 0. I always used to get a correct
> key_code and button with 1.0.1 and the method of initing input devices
> described in Problem I above.
> 
> Any help/ideas greatly appreciated.
> 
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to