CVideoSettings: avoid unnecessary display of messageboxes

Origin commit data
------------------
Commit: be9dd7938d
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-02-24 (Fri, 24 Feb 2017)
This commit is contained in:
2017-02-24 23:06:35 +01:00
parent fe9a6338b1
commit 856c7071e8

View File

@@ -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;