From f45456d7a8b7a6f9b818e725856e272adec39eca Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 20 Feb 2017 20:36:45 +0100 Subject: [PATCH] rcinput: remove unused/unimplemented click functions --- src/driver/audioplay.cpp | 3 --- src/driver/rcinput.cpp | 26 -------------------------- src/driver/rcinput.h | 6 ------ src/gui/scan.cpp | 2 -- src/neutrino.cpp | 2 -- src/system/settings.h | 1 - 6 files changed, 40 deletions(-) diff --git a/src/driver/audioplay.cpp b/src/driver/audioplay.cpp index 956319297..494eb9baf 100644 --- a/src/driver/audioplay.cpp +++ b/src/driver/audioplay.cpp @@ -90,7 +90,6 @@ void* CAudioPlayer::PlayThread( void* /*dummy*/ ) { int soundfd = -1; set_threadname("audio:play"); - g_RCInput->close_click(); /* Decode stdin to stdout. */ CBaseDec::RetCode Status = CBaseDec::DecoderBase( &getInstance()->m_Audiofile, soundfd, @@ -109,8 +108,6 @@ void* CAudioPlayer::PlayThread( void* /*dummy*/ ) "unknown" ); } - g_RCInput->open_click(); - getInstance()->state = CBaseDec::STOP; pthread_exit(0); return NULL; diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 1193e2f5b..6161fb941 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -143,7 +143,6 @@ CRCInput::CRCInput() perror("[neutrino] listen failed...\n"); exit( -1 ); } - clickfd = -1; repeat_block = repeat_block_generic = 0; checkdev(); open(); @@ -335,7 +334,6 @@ void CRCInput::open(bool recheck) //+++++++++++++++++++++++++++++++++++++++ #endif /* KEYBOARD_INSTEAD_OF_REMOTE_CONTROL */ - open_click(); calculateMaxFd(); } @@ -396,7 +394,6 @@ CRCInput::~CRCInput() if(fd_event) ::close(fd_event); - close_click(); } /************************************************************************** @@ -1474,8 +1471,6 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 *msg = trkey; *data = 0; /* <- button pressed */ - if(g_settings.key_click) - play_click(); return; } } /*if keyok */ @@ -1780,27 +1775,6 @@ int CRCInput::translate(int code) return (int)RC_nokey; } -void CRCInput::close_click() -{ -} - -void CRCInput::open_click() -{ -} -#if 0 -//never used -void CRCInput::reset_dsp(int /*rate*/) -{ -} - -void CRCInput::set_dsp() -{ -} -#endif -void CRCInput::play_click() -{ -} - void CRCInput::setKeyRepeatDelay(unsigned int start_ms, unsigned int repeat_ms) { for (std::vector::iterator it = indev.begin(); it != indev.end(); ++it) { diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index 848e54cf6..37cfd4b8a 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -164,10 +164,8 @@ class CRCInput int fd_event; int fd_max; - int clickfd; __u16 rc_last_key; OpenThreads::Mutex mutex; - void set_dsp(); void open(bool recheck = false); bool checkpath(in_dev id); @@ -329,10 +327,6 @@ class CRCInput void clearRCMsg(); int messageLoop( bool anyKeyCancels = false, int timeout= -1 ); - void open_click(); - void close_click(); - void play_click(); - void reset_dsp(int rate); void setLongPressAny(bool b) { longPressAny = b; }; void setKeyRepeatDelay(unsigned int start_ms, unsigned int repeat_ms); diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 5a6213853..d26ea9229 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -278,7 +278,6 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) success = false; if(!manual) { - g_RCInput->close_click(); if (my_system(NEUTRINO_SCAN_START_SCRIPT) != 0) perror(NEUTRINO_SCAN_START_SCRIPT " failed"); } @@ -344,7 +343,6 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) if(!manual) { if (my_system(NEUTRINO_SCAN_STOP_SCRIPT) != 0) perror(NEUTRINO_SCAN_STOP_SCRIPT " failed"); - g_RCInput->open_click(); } if(!test) { CComponentsHeaderLocalized header(x, y, width, hheight, success ? LOCALE_SCANTS_FINISHED : LOCALE_SCANTS_FAILED); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a1ae72747..1844b0276 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4386,7 +4386,6 @@ void CNeutrinoApp::loadKeys(const char * fname) /* options */ g_settings.menu_left_exit = tconfig.getInt32( "menu_left_exit", 0 ); - g_settings.key_click = tconfig.getInt32( "key_click", 1 ); g_settings.repeat_blocker = tconfig.getInt32("repeat_blocker", 150); g_settings.repeat_genericblocker = tconfig.getInt32("repeat_genericblocker", 100); g_settings.longkeypress_duration = tconfig.getInt32("longkeypress_duration", LONGKEYPRESS_OFF); @@ -4469,7 +4468,6 @@ void CNeutrinoApp::saveKeys(const char * fname) tconfig.setInt32( "key_pic_size_active", g_settings.key_pic_size_active ); tconfig.setInt32( "menu_left_exit", g_settings.menu_left_exit ); - tconfig.setInt32( "key_click", g_settings.key_click ); tconfig.setInt32( "repeat_blocker", g_settings.repeat_blocker ); tconfig.setInt32( "repeat_genericblocker", g_settings.repeat_genericblocker ); tconfig.setInt32( "longkeypress_duration", g_settings.longkeypress_duration ); diff --git a/src/system/settings.h b/src/system/settings.h index 2c91416f6..64b6423c4 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -504,7 +504,6 @@ struct SNeutrinoSettings int key_list_end; int key_power_off; int menu_left_exit; - int key_click; int timeshift_pause; int auto_timeshift; int temp_timeshift;