mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
tuxtxt: use neutrino rcinput
Origin commit data
------------------
Commit: af6881a53c
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-11-02 (Fri, 02 Nov 2012)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
INCLUDES = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_srcdir)/lib/libconfigfile \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/zapit/include \
|
||||
$(FREETYPE_CFLAGS)
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <dmx.h>
|
||||
#include <video.h>
|
||||
#include <sys/stat.h>
|
||||
#include <global.h>
|
||||
|
||||
/* same as in rcinput.h... */
|
||||
#define KEY_TTTV KEY_FN_1
|
||||
@@ -1836,7 +1837,7 @@ int tuxtx_main(int _rc, int pid, int page, int source)
|
||||
case RC_7:
|
||||
case RC_8:
|
||||
case RC_9:
|
||||
PageInput(RCCode - RC_0);
|
||||
PageInput(CRCInput::getNumericValue(RCCode));
|
||||
break;
|
||||
case RC_RED: ColorKey(prev_100); break;
|
||||
case RC_GREEN: ColorKey(prev_10); break;
|
||||
@@ -1850,6 +1851,7 @@ int tuxtx_main(int _rc, int pid, int page, int source)
|
||||
RCCode = RC_HOME;
|
||||
SwitchTranspMode();
|
||||
break;
|
||||
case RC_INFO:
|
||||
case RC_HELP: SwitchHintMode(); break;
|
||||
case RC_DBOX: ConfigMenu(0); break;
|
||||
case RC_HOME:
|
||||
@@ -2891,15 +2893,14 @@ void ConfigMenu(int Init)
|
||||
do {
|
||||
if (GetRCCode() == 1)
|
||||
{
|
||||
int rc_num = -1;
|
||||
|
||||
if (
|
||||
#if (RC_1 > 0)
|
||||
RCCode >= RC_1 && /* generates a warning... */
|
||||
#endif
|
||||
RCCode <= RC_1+M_MaxDirect) /* direct access */
|
||||
if (CRCInput::isNumeric(RCCode))
|
||||
rc_num = CRCInput::getNumericValue(RCCode) -1; /* valid: 1 to M_MaxDirect */
|
||||
if (rc_num >= 0 && rc_num <= M_MaxDirect) /* direct access */
|
||||
{
|
||||
Menu_HighlightLine(menu, MenuLine[menuitem], 0);
|
||||
menuitem = RCCode-RC_1;
|
||||
menuitem = rc_num;
|
||||
Menu_HighlightLine(menu, MenuLine[menuitem], 1);
|
||||
|
||||
if (menuitem != M_PID) /* just select */
|
||||
@@ -6434,6 +6435,21 @@ void DecodePage()
|
||||
/******************************************************************************
|
||||
* GetRCCode *
|
||||
******************************************************************************/
|
||||
int GetRCCode()
|
||||
{
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
g_RCInput->getMsg_ms(&msg, &data, 40);
|
||||
RCCode = -1;
|
||||
|
||||
if (msg <= CRCInput::RC_MaxRC) {
|
||||
RCCode = msg;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
int GetRCCode()
|
||||
{
|
||||
@@ -6572,6 +6588,7 @@ int GetRCCode()
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* Local Variables: */
|
||||
/* indent-tabs-mode:t */
|
||||
/* tab-width:3 */
|
||||
|
@@ -44,6 +44,8 @@
|
||||
#include FT_CACHE_H
|
||||
#include FT_CACHE_SMALL_BITMAPS_H
|
||||
|
||||
#include <driver/rcinput.h>
|
||||
|
||||
/* devices */
|
||||
|
||||
#if TUXTXT_CFG_STANDALONE
|
||||
@@ -144,6 +146,7 @@ int tv_pip_y;
|
||||
#define hold_mosaic 0x1E
|
||||
#define release_mosaic 0x1F
|
||||
|
||||
#if 0
|
||||
/* rc codes */
|
||||
#define RC_0 0x00
|
||||
#define RC_1 0x01
|
||||
@@ -172,6 +175,36 @@ int tv_pip_y;
|
||||
#define RC_DBOX 0x18
|
||||
#define RC_TEXT 0x19
|
||||
#define RC_HOME 0x1F
|
||||
#else
|
||||
#define RC_0 CRCInput::RC_0
|
||||
#define RC_1 CRCInput::RC_1
|
||||
#define RC_2 CRCInput::RC_2
|
||||
#define RC_3 CRCInput::RC_3
|
||||
#define RC_4 CRCInput::RC_4
|
||||
#define RC_5 CRCInput::RC_5
|
||||
#define RC_6 CRCInput::RC_6
|
||||
#define RC_7 CRCInput::RC_7
|
||||
#define RC_8 CRCInput::RC_8
|
||||
#define RC_9 CRCInput::RC_9
|
||||
#define RC_RIGHT CRCInput::RC_right
|
||||
#define RC_LEFT CRCInput::RC_left
|
||||
#define RC_UP CRCInput::RC_up
|
||||
#define RC_DOWN CRCInput::RC_down
|
||||
#define RC_OK CRCInput::RC_ok
|
||||
#define RC_MUTE CRCInput::RC_spkr
|
||||
#define RC_STANDBY CRCInput::RC_standby
|
||||
#define RC_GREEN CRCInput::RC_green
|
||||
#define RC_YELLOW CRCInput::RC_yellow
|
||||
#define RC_RED CRCInput::RC_red
|
||||
#define RC_BLUE CRCInput::RC_blue
|
||||
#define RC_PLUS CRCInput::RC_plus
|
||||
#define RC_MINUS CRCInput::RC_minus
|
||||
#define RC_HELP CRCInput::RC_help
|
||||
#define RC_INFO CRCInput::RC_info
|
||||
#define RC_DBOX CRCInput::RC_setup
|
||||
#define RC_TEXT CRCInput::RC_text
|
||||
#define RC_HOME CRCInput::RC_home
|
||||
#endif
|
||||
|
||||
typedef enum /* object type */
|
||||
{
|
||||
@@ -579,7 +612,7 @@ int subtitledelay, delaystarted;
|
||||
FILE *conf;
|
||||
|
||||
|
||||
unsigned short RCCode;
|
||||
neutrino_msg_t RCCode;
|
||||
|
||||
struct _pid_table
|
||||
{
|
||||
|
Reference in New Issue
Block a user