1 diff -u tuxtxt_orig/tuxtxt.c tuxtxt/tuxtxt.c
2 --- tuxtxt_orig/tuxtxt.c 2009-01-29 21:38:42.000000000 +0100
3 +++ tuxtxt/tuxtxt.c 2009-01-29 21:44:29.000000000 +0100
5 char cvs_revision[] = "$Revision: 1.108 $";
9 #if !TUXTXT_CFG_STANDALONE
10 int initialized = tuxtxt_init();
14 tuxtxt_SetRenderingDefaults(&renderinfo);
16 - tuxtxt_cache.vtxtpid = renderinfo.fb = lcd = rc = renderinfo.sx = renderinfo.ex = renderinfo.sy = renderinfo.ey = -1;
17 + tuxtxt_cache.vtxtpid = renderinfo.fb = lcd = renderinfo.sx = renderinfo.ex = renderinfo.sy = renderinfo.ey = -1;
20 printf("\nUSAGE: tuxtxt vtpid\n");
22 perror("TuxTxt <open /dev/fb/0>");
35 /* open Remote Control */
36 - if ((rc=open(tmp, O_RDONLY)) == -1)
37 + if ((rc[rc_num]=open(tmp, O_RDONLY)) == -1)
39 perror("TuxTxt <open remote control>");
42 - if (ioctl(rc, EVIOCGNAME(128), tmp) < 0)
43 + if (ioctl(rc[rc_num], EVIOCGNAME(128), tmp) < 0)
44 perror("EVIOCGNAME failed");
45 - if (strstr(tmp, "remote control"))
49 + if (!strstr(tmp, "remote control"))
62 - printf("couldnt find correct input device!!!\n");
63 + printf("couldnt find usable input device!!!\n");
71 - if (tuxtxt_cache.vtxtpid == -1 || renderinfo.fb == -1 || rc == -1 || renderinfo.sx == -1 || renderinfo.ex == -1 || renderinfo.sy == -1 || renderinfo.ey == -1)
72 + if (tuxtxt_cache.vtxtpid == -1 || renderinfo.fb == -1 || renderinfo.sx == -1 || renderinfo.ex == -1 || renderinfo.sy == -1 || renderinfo.ey == -1)
74 printf("TuxTxt <Invalid Param(s)>\n");
77 writeproc("/proc/stb/avs/0/sb", fncmodes[renderinfo.screen_mode1]);
80 - ioctl(rc, RC_IOCTL_BCODES, 1);
81 + if (rc[0] >= 0) ioctl(rc[0], RC_IOCTL_BCODES, 1);
82 + if (rc[1] >= 0) ioctl(rc[1], RC_IOCTL_BCODES, 1);
97 + lcd = rc[0] = rc[1] = -1;
101 @@ -2819,20 +2827,28 @@
103 timeout.tv_usec = 100000;
108 + FD_SET(rc[0], &rset);
118 + FD_SET(rc[1], &rset);
125 if (select(maxfd + 1, &rset, NULL, NULL, &timeout) > 0)
127 - if (rc >= 0 && FD_ISSET(rc, &rset))
128 + if (rc[0] >= 0 && FD_ISSET(rc[0], &rset))
130 #if HAVE_DVB_API_VERSION < 3
131 - read(rc, &RCCode, 2);
132 + read(rc[0], &RCCode, 2);
134 if (RCCode != LastKey)
136 @@ -2842,7 +2858,11 @@
140 - read(rc, &ev, sizeof(ev));
141 + read(rc[0], &ev, sizeof(ev));
143 + else if (rc[1] >= 0 && FD_ISSET(rc[1], &rset))
145 + read(rc[1], &ev, sizeof(ev));
149 Only in tuxtxt_orig/: tuxtxt.c.orig
150 diff -u tuxtxt_orig/tuxtxt.h tuxtxt/tuxtxt.h
151 --- tuxtxt_orig/tuxtxt.h 2009-01-29 21:38:18.000000000 +0100
152 +++ tuxtxt/tuxtxt.h 2009-01-29 21:44:29.000000000 +0100