rcinput: simplify calcTimeoutEnd() calls; 0 is "off" by default now

Origin commit data
------------------
Commit: ebc621f3b2
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-29 (Fri, 29 Sep 2017)

Origin message was:
------------------
- rcinput: simplify calcTimeoutEnd() calls; 0 is "off" by default now
This commit is contained in:
vanhofen
2017-09-29 08:27:42 +02:00
parent cce794bbac
commit 1776ae664d
28 changed files with 93 additions and 98 deletions

View File

@@ -110,8 +110,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
bool doLoop = true;
int timeout = g_settings.timing[SNeutrinoSettings::TIMING_MENU];
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout == 0 ? 0xFFFF : timeout);
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
uint32_t updateTimer = g_RCInput->addTimer(5*1000*1000, false);
while (doLoop)
@@ -129,7 +128,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
( msg == CRCInput::RC_home ) ||
( msg == CRCInput::RC_ok ) ) {
if(fader.StartFadeOut()) {
timeoutEnd = CRCInput::calcTimeoutEnd( 1 );
timeoutEnd = CRCInput::calcTimeoutEnd(1);
msg = 0;
} else
doLoop = false;
@@ -157,7 +156,7 @@ int CDBoxInfoWidget::exec(CMenuTarget* parent, const std::string &)
if ((msg <= CRCInput::RC_MaxRC) &&
(data == 0)) /* <- button pressed */
{
timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
}
}
}