From 78bd385f78c3bae843ce3671c1b0ce2d90dd90fb Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 11 Sep 2014 21:57:18 +0200 Subject: [PATCH] shellwindow: add timeout Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/caabe9707c98800233c3edb684ac589c644b3b58 Author: vanhofen Date: 2014-09-11 (Thu, 11 Sep 2014) Origin message was: ------------------ - shellwindow: add timeout --- src/gui/widget/shellwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index 6610f53b2..a3208c7d3 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -191,9 +191,10 @@ CShellWindow::~CShellWindow() neutrino_msg_t msg; neutrino_msg_data_t data; + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); do - g_RCInput->getMsg(&msg, &data, 100); - while (msg != CRCInput::RC_ok && msg != CRCInput::RC_home); + g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd); + while (msg != CRCInput::RC_ok && msg != CRCInput::RC_home && msg != CRCInput::RC_timeout); frameBuffer->Clear(); frameBuffer->blit();