mirror of https://github.com/mpv-player/mpv
DirectFB 0.9.9 support - patch by Aubin Paul <aubin@punknews.org>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5027 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
85aedd0005
commit
5c18ffdd1c
|
@ -1507,6 +1507,23 @@ else
|
||||||
fi
|
fi
|
||||||
echores "$_directfb"
|
echores "$_directfb"
|
||||||
|
|
||||||
|
echocheck "DirectFB >= 0.9.9"
|
||||||
|
if test "$_directfb" = auto; then
|
||||||
|
_directfb=no
|
||||||
|
cat > $TMPC <<EOF
|
||||||
|
#include <directfb.h>
|
||||||
|
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 ...
|
# Checking for localization ...
|
||||||
echocheck "language"
|
echocheck "language"
|
||||||
|
|
|
@ -108,7 +108,12 @@ static IDirectFBSurface *frame = NULL;
|
||||||
/*
|
/*
|
||||||
* A buffer for input events.
|
* A buffer for input events.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_DIRECTFB099
|
||||||
|
static IDirectFBEventBuffer *buffer = NULL;
|
||||||
|
#else
|
||||||
static IDirectFBInputBuffer *buffer = NULL;
|
static IDirectFBInputBuffer *buffer = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
/******************************
|
/******************************
|
||||||
* vo_directfb *
|
* vo_directfb *
|
||||||
|
@ -574,7 +579,11 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
|
||||||
/*
|
/*
|
||||||
* Create an input buffer for the keyboard.
|
* Create an input buffer for the keyboard.
|
||||||
*/
|
*/
|
||||||
|
#ifdef HAVE_DIRECTFB099
|
||||||
|
DFBCHECK (keyboard->CreateEventBuffer (DICAPS_ALL, &buffer));
|
||||||
|
#else
|
||||||
DFBCHECK (keyboard->CreateInputBuffer (keyboard, &buffer));
|
DFBCHECK (keyboard->CreateInputBuffer (keyboard, &buffer));
|
||||||
|
#endif
|
||||||
|
|
||||||
// yuv2rgb transform init
|
// yuv2rgb transform init
|
||||||
|
|
||||||
|
@ -797,8 +806,11 @@ static void check_events(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
DFBInputEvent event;
|
DFBInputEvent event;
|
||||||
|
#ifdef HAVE_DIRECTFB099
|
||||||
|
if (buffer->GetEvent (buffer, DFB_EVENT(&event)) == DFB_OK) {
|
||||||
|
#else
|
||||||
if (buffer->GetEvent (buffer, &event) == DFB_OK) {
|
if (buffer->GetEvent (buffer, &event) == DFB_OK) {
|
||||||
|
#endif
|
||||||
if (event.type == DIET_KEYPRESS) {
|
if (event.type == DIET_KEYPRESS) {
|
||||||
switch (event.keycode) {
|
switch (event.keycode) {
|
||||||
case DIKC_ESCAPE:
|
case DIKC_ESCAPE:
|
||||||
|
|
Loading…
Reference in New Issue