CVideoSettings: avoid unnecessary display of messageboxes

This commit is contained in:
2017-02-24 23:06:35 +01:00
parent 803253e3d4
commit be9dd7938d

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;