# HG changeset patch # User arpi # Date 1015775221 0 # Node ID 693b917ac9160346df2f1934fc7ca8adb265f774 # Parent 6d8971d55e405df3cc6e78ee2a746c6054c26b3d DirectFB 0.9.9 support - patch by Aubin Paul diff -r 6d8971d55e40 -r 693b917ac916 configure --- a/configure Sun Mar 10 13:53:38 2002 +0000 +++ b/configure Sun Mar 10 15:47:01 2002 +0000 @@ -1507,6 +1507,23 @@ fi echores "$_directfb" +echocheck "DirectFB >= 0.9.9" +if test "$_directfb" = auto; then + _directfb=no + cat > $TMPC < +nt main(void) { IDirectFBEventBuffer *foo; return 0; } +EOF + linux && test -c /dev/fb0 && cc_check -ldirectfb && _directfb=yes +fi +if test "$_directfb" = yes ; then + _def_directfb='#define HAVE_DIRECTFB099 1' +else + _def_directfb='#undef HAVE_DIRECTFB' +fi +echores "$_directfb" + + # Checking for localization ... echocheck "language" diff -r 6d8971d55e40 -r 693b917ac916 libvo/vo_directfb.c --- a/libvo/vo_directfb.c Sun Mar 10 13:53:38 2002 +0000 +++ b/libvo/vo_directfb.c Sun Mar 10 15:47:01 2002 +0000 @@ -108,7 +108,12 @@ /* * A buffer for input events. */ + +#ifdef HAVE_DIRECTFB099 +static IDirectFBEventBuffer *buffer = NULL; +#else static IDirectFBInputBuffer *buffer = NULL; +#endif /****************************** * vo_directfb * @@ -574,7 +579,11 @@ /* * Create an input buffer for the keyboard. */ +#ifdef HAVE_DIRECTFB099 + DFBCHECK (keyboard->CreateEventBuffer (DICAPS_ALL, &buffer)); +#else DFBCHECK (keyboard->CreateInputBuffer (keyboard, &buffer)); +#endif // yuv2rgb transform init @@ -797,8 +806,11 @@ { DFBInputEvent event; - +#ifdef HAVE_DIRECTFB099 +if (buffer->GetEvent (buffer, DFB_EVENT(&event)) == DFB_OK) { +#else if (buffer->GetEvent (buffer, &event) == DFB_OK) { +#endif if (event.type == DIET_KEYPRESS) { switch (event.keycode) { case DIKC_ESCAPE: