summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduard Hasenleithner <ehasenle@users.sourceforge.net>2001-08-14 10:17:58 +0000
committerEduard Hasenleithner <ehasenle@users.sourceforge.net>2001-08-14 10:17:58 +0000
commitdeb883ae107df015d5554d815db8b6b031b7c9c0 (patch)
treec6dd09372c9b2551c88321319bafd00ad65a9f12
parent1d89db992a61b194d6e0e6211183c2cbe902d817 (diff)
downloadxine-lib-deb883ae107df015d5554d815db8b6b031b7c9c0.tar.gz
xine-lib-deb883ae107df015d5554d815db8b6b031b7c9c0.tar.bz2
Replaced the dxr3 button event stub with real code.
CVS patchset: 426 CVS date: 2001/08/14 10:17:58
-rw-r--r--src/dxr3/dxr3_decoder.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/dxr3/dxr3_decoder.c b/src/dxr3/dxr3_decoder.c
index f794c50dc..87bf2be13 100644
--- a/src/dxr3/dxr3_decoder.c
+++ b/src/dxr3/dxr3_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_decoder.c,v 1.9 2001/08/13 12:53:53 ehasenle Exp $
+ * $Id: dxr3_decoder.c,v 1.10 2001/08/14 10:17:58 ehasenle Exp $
*
* dxr3 video and spu decoder plugin. Accepts the video and spu data
* from XINE and sends it directly to the corresponding dxr3 devices.
@@ -353,21 +353,46 @@ static void spudec_close (spu_decoder_t *this_gen)
}
static void spudec_event (spu_decoder_t *this_gen, spu_event_t *event) {
-#if 0
spudec_decoder_t *this = (spudec_decoder_t*) this_gen;
switch (event->sub_type) {
case SPU_EVENT_BUTTON:
{
- spu_button_t *but = event->data;
+ spu_button_t *but = event->data;
+ em8300_button_t btn;
+ int i;
+
+ if (!but->show) {
+ ioctl(this->fd_spu, EM8300_IOCTL_SPU_BUTTON, NULL);
+ break;
+ }
+ btn.color = btn.contrast = 0;
+
+ for (i = 0; i < 4; i++) {
+ btn.color |= (but->color[i] & 0xf) << (4*i);
+ btn.contrast |= (but->trans[i] & 0xf) << (4*i);
+ }
+
+ btn.left = but->left;
+ btn.right = but->right;
+ btn.top = but->top;
+ btn.bottom = but->bottom;
+
+ if (ioctl(this->fd_spu, EM8300_IOCTL_SPU_BUTTON, &btn))
+ fprintf(stderr, "dxr3: failed to set spu button (%s)\n",
+ strerror(errno));
}
break;
case SPU_EVENT_CLUT:
{
- spu_cltbl_t *clut = event->data;
+ spu_cltbl_t *clut = event->data;
+ swab_clut(clut->clut);
+
+ if (ioctl(this->fd_spu, EM8300_IOCTL_SPU_SETPALETTE, clut->clut))
+ fprintf(stderr, "dxr3: failed to set CLUT (%s)\n",
+ strerror(errno));
}
break;
}
-#endif
}
static char *spudec_get_id(void)