Commit 1f4c177f authored by Sam Hocevar's avatar Sam Hocevar

* ./modules/visualization/xosd/xosd.c: fixed compilation with version 2 of

    libxosd.
parent 58296e63
...@@ -2497,9 +2497,13 @@ AC_ARG_ENABLE(xosd, ...@@ -2497,9 +2497,13 @@ AC_ARG_ENABLE(xosd,
if test "x${enable_xosd}" = "xyes" if test "x${enable_xosd}" = "xyes"
then then
AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false") AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
AC_TRY_COMPILE([#include <xosd.h>], AC_CHECK_LIB(xosd,xosd_set_offset,
[void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],, AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if <xosd.h> is 1.0.x),
AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if <xosd.h> is pre-1.0.0)) AC_CHECK_LIB(xosd,xosd_set_horizontal_offset,
AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if <xosd.h> is 2.0.x),
AC_TRY_COMPILE([#include <xosd.h>],
[void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if <xosd.h> is pre-1.0.0))))
if test "x${have_xosd}" = "xtrue" if test "x${have_xosd}" = "xtrue"
then then
PLUGINS="${PLUGINS} xosd" PLUGINS="${PLUGINS} xosd"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* xosd.c : X On Screen Display interface * xosd.c : X On Screen Display interface
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: xosd.c,v 1.5 2003/01/22 19:37:50 lool Exp $ * $Id: xosd.c,v 1.6 2003/01/28 16:52:36 sam Exp $
* *
* Authors: Loc Minier <lool@videolan.org> * Authors: Loc Minier <lool@videolan.org>
* *
...@@ -108,7 +108,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -108,7 +108,7 @@ static int Open( vlc_object_t *p_this )
/* Initialize library */ /* Initialize library */
p_intf->p_sys->p_osd = p_intf->p_sys->p_osd =
#ifdef HAVE_OLD_XOSD_H #ifdef HAVE_XOSD_VERSION_0
xosd_init( config_GetPsz( p_intf, "xosd-font" ), xosd_init( config_GetPsz( p_intf, "xosd-font" ),
"LawnGreen", 3, XOSD_top, 0, 1 ); "LawnGreen", 3, XOSD_top, 0, 1 );
#else #else
...@@ -190,8 +190,15 @@ static void Run( intf_thread_t *p_intf ) ...@@ -190,8 +190,15 @@ static void Run( intf_thread_t *p_intf )
/* Set user preferences */ /* Set user preferences */
xosd_set_font( p_intf->p_sys->p_osd, xosd_set_font( p_intf->p_sys->p_osd,
config_GetPsz( p_intf, "xosd-font" ) ); config_GetPsz( p_intf, "xosd-font" ) );
#ifdef HAVE_XOSD_VERSION_2
xosd_set_horizontal_offset( p_intf->p_sys->p_osd,
config_GetInt( p_intf, "xosd-text-offset" ) );
xosd_set_vertical_offset( p_intf->p_sys->p_osd,
config_GetInt( p_intf, "xosd-text-offset" ) );
#else
xosd_set_offset( p_intf->p_sys->p_osd, xosd_set_offset( p_intf->p_sys->p_osd,
config_GetInt( p_intf, "xosd-text-offset" ) ); config_GetInt( p_intf, "xosd-text-offset" ) );
#endif
xosd_set_shadow_offset( p_intf->p_sys->p_osd, xosd_set_shadow_offset( p_intf->p_sys->p_osd,
config_GetInt( p_intf, "xosd-shadow-offset" )); config_GetInt( p_intf, "xosd-shadow-offset" ));
xosd_set_pos( p_intf->p_sys->p_osd, xosd_set_pos( p_intf->p_sys->p_osd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment