tuxtxt: don't try to manipulate input fd

the CRCInput class is used for input anyway, so
this does not make any sense.
This commit is contained in:
Stefan Seyfried
2013-11-09 18:57:10 +01:00
parent 4eb66ba4b2
commit e06e845eae
2 changed files with 4 additions and 23 deletions

View File

@@ -1630,7 +1630,7 @@ int tuxtx_subtitle_running(int *pid, int *page, int *running)
return ret;
}
int tuxtx_main(int _rc, int pid, int page, int source)
int tuxtx_main(int /*_rc*/, int pid, int page, int source)
{
char cvs_revision[] = "$Revision: 1.95 $";
@@ -1663,7 +1663,6 @@ int tuxtx_main(int _rc, int pid, int page, int source)
}
#endif
rc = _rc;
CFrameBuffer *fbp = CFrameBuffer::getInstance();
lfb = (unsigned char *)fbp->getFrameBufferPointer();
lbb = (unsigned char *)fbp->getBackBufferPointer();
@@ -1675,8 +1674,6 @@ int tuxtx_main(int _rc, int pid, int page, int source)
else
printf("[tuxtxt] using PID %x page %d\n", tuxtxt_cache.vtxtpid, tuxtxt_cache.page);
fcntl(rc, F_SETFL, fcntl(rc, F_GETFL) | O_EXCL | O_NONBLOCK);
#if 0 /* just get it from the framebuffer class */
/* get fixed screeninfo */
if (ioctl(fb, FBIOGET_FSCREENINFO, &fix_screeninfo) == -1)
@@ -2246,7 +2243,6 @@ int Init(int source)
#else
tuxtxt_start(tuxtxt_cache.vtxtpid, source);
#endif
fcntl(rc, F_SETFL, O_NONBLOCK);
gethotlist();
if(use_gui)
@@ -2840,7 +2836,7 @@ void Menu_Init(char *menu, int current_pid, int menuitem, int hotindex)
void ConfigMenu(int Init)
{
int val, menuitem = M_Start;
int menuitem = M_Start;
int current_pid = 0;
int hotindex;
int oldscreenmode, oldtrans = 0;
@@ -2894,10 +2890,6 @@ void ConfigMenu(int Init)
clearbbcolor = black;
Menu_Init(menu, current_pid, menuitem, hotindex);
/* set blocking mode */
val = fcntl(rc, F_GETFL);
fcntl(rc, F_SETFL, val &~ O_NONBLOCK);
/* loop */
do {
if (GetRCCode() == 1)
@@ -3369,7 +3361,6 @@ void ConfigMenu(int Init)
current_service = current_pid;
// RenderMessage(ShowServiceName);
fcntl(rc, F_SETFL, O_NONBLOCK);
RCCode = -1;
if (oldscreenmode)
SwitchScreenMode(oldscreenmode); /* restore divided screen */
@@ -3430,8 +3421,6 @@ void ConfigMenu(int Init)
ClearBB(transp);
CopyBB2FB();
/* reset to nonblocking mode */
fcntl(rc, F_SETFL, O_NONBLOCK);
tuxtxt_cache.pageupdate = 1;
RCCode = -1;
if (oldscreenmode)
@@ -3646,7 +3635,7 @@ void ColorKey(int target)
void PageCatching()
{
int val, byte;
int byte;
int oldzoommode = zoommode;
pagecatching = 1;
@@ -3676,10 +3665,6 @@ void PageCatching()
return;
}
/* set blocking mode */
val = fcntl(rc, F_GETFL);
fcntl(rc, F_SETFL, val &~ O_NONBLOCK);
/* loop */
do {
GetRCCode();
@@ -3718,7 +3703,6 @@ void PageCatching()
case RC_HOME:
case RC_HELP:
case RC_MUTE:
fcntl(rc, F_SETFL, O_NONBLOCK);
tuxtxt_cache.pageupdate = 1;
pagecatching = 0;
RCCode = -1;
@@ -3742,9 +3726,6 @@ void PageCatching()
tuxtxt_cache.subpage = subp;
else
tuxtxt_cache.subpage = 0;
/* reset to nonblocking mode */
fcntl(rc, F_SETFL, O_NONBLOCK);
}
/******************************************************************************