From 856c7071e80cef2c573d42dad89df05bfa37accc Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 24 Feb 2017 23:06:35 +0100 Subject: [PATCH] CVideoSettings: avoid unnecessary display of messageboxes Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/be9dd7938dbdb16e068ff27879be4a203b0b1934 Author: Thilo Graf Date: 2017-02-24 (Fri, 24 Feb 2017) --- src/gui/videosettings.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/videosettings.cpp b/src/gui/videosettings.cpp index 6515f171e..9a013a6af 100644 --- a/src/gui/videosettings.cpp +++ b/src/gui/videosettings.cpp @@ -565,6 +565,7 @@ void CVideoSettings::nextMode(void) int curmode = 0; int i; bool disp_cur = 1; + int res = messages_return::none; for (i = 0; i < VIDEOMENU_VIDEOMODE_OPTION_COUNT; i++) { if (VIDEOMENU_VIDEOMODE_OPTIONS[i].key == g_settings.video_Mode) { @@ -576,7 +577,9 @@ void CVideoSettings::nextMode(void) while(1) { CVFD::getInstance()->ShowText(text); - int res = ShowHint(LOCALE_VIDEOMENU_VIDEOMODE, text, 450, 2); + + if (res != messages_return::cancel_info) // avoid unnecessary display of messageboxes, when user is trying to press repeated format button + res = ShowHint(LOCALE_VIDEOMENU_VIDEOMODE, text, 450, 2); if(disp_cur && res != messages_return::handled) break;