Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
82ca50d3
Commit
82ca50d3
authored
Jan 21, 2008
by
Rafaël Carré
Browse files
fix #1387 (update to new libcaca api)
parent
36d62b40
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
82ca50d3
...
...
@@ -4631,6 +4631,13 @@ then
VLC_ADD_PLUGINS([caca])
VLC_ADD_CFLAGS([caca],[`${CACA_CONFIG} --cflags`])
VLC_ADD_LIBS([caca],[`${CACA_CONFIG} --plugin-libs`])
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <caca.h>
caca_event_t ev;]],
[[ev.type = 0;]]
)],
[],
[AC_DEFINE(CACA_EVENT_OPAQUE, [1], ["Define if struct caca_event is opaque and must not be accessed directly"])]
)
fi
fi
...
...
modules/video_output/caca.c
View file @
82ca50d3
...
...
@@ -304,14 +304,22 @@ static int Manage( vout_thread_t *p_vout )
vlc_value_t
val
;
#ifdef CACA_API_VERSION_1
#ifdef CACA_EVENT_OPAQUE
switch
(
caca_get_event_type
(
&
ev
)
)
#else
switch
(
ev
.
type
)
#endif
/* CACA_EVENT_OPAQUE */
#else
switch
(
ev
)
#endif
{
case
CACA_EVENT_KEY_RELEASE
:
#ifdef CACA_API_VERSION_1
#ifdef CACA_EVENT_OPAQUE
switch
(
caca_get_event_key_ch
(
&
ev
)
)
#else
switch
(
ev
.
data
.
key
.
ch
)
#endif
/* CACA_EVENT_OPAQUE */
#else
switch
(
ev
&
0x00ffffff
)
#endif
...
...
@@ -334,10 +342,22 @@ static int Manage( vout_thread_t *p_vout )
break
;
#ifdef CACA_API_VERSION_1
case
CACA_EVENT_MOUSE_MOTION
:
val
.
i_int
=
ev
.
data
.
mouse
.
x
*
p_vout
->
render
.
i_width
val
.
i_int
=
#ifdef CACA_EVENT_OPAQUE
caca_get_event_mouse_x
(
&
ev
)
#else
ev
.
data
.
mouse
.
x
#endif
/* CACA_EVENT_OPAQUE */
*
p_vout
->
render
.
i_width
/
cucul_get_canvas_width
(
p_vout
->
p_sys
->
p_cv
);
var_Set
(
p_vout
,
"mouse-x"
,
val
);
val
.
i_int
=
ev
.
data
.
mouse
.
y
*
p_vout
->
render
.
i_height
val
.
i_int
=
#ifdef CACA_EVENT_OPAQUE
caca_get_event_mouse_y
(
&
ev
)
#else
ev
.
data
.
mouse
.
y
#endif
/* CACA_EVENT_OPAQUE */
*
p_vout
->
render
.
i_height
/
cucul_get_canvas_height
(
p_vout
->
p_sys
->
p_cv
);
var_Set
(
p_vout
,
"mouse-y"
,
val
);
val
.
b_bool
=
VLC_TRUE
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment