Up/Down keys should change locale in BIOS screens.

BUG=chrome-os-partner:5927
TEST=manual

Install BIOS with valid bitmaps, boot to dev-mode or recovery, press arrow
keys.

Change-Id: I3946bac94cc075f9d11b4dd3fcb118807c3318c4
Reviewed-on: http://gerrit.chromium.org/gerrit/7636
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Bill Richardson
2011-09-13 13:42:01 -07:00
parent 9137e8df48
commit c55f0f6c7a

View File

@@ -468,7 +468,8 @@ VbError_t VbCheckDisplayKey(VbCommonParams* cparams, uint32_t key,
/* Tab = display debug info */ /* Tab = display debug info */
return VbDisplayDebugInfo(cparams, vncptr); return VbDisplayDebugInfo(cparams, vncptr);
} else if (VB_KEY_LEFT == key || VB_KEY_RIGHT == key) { } else if (VB_KEY_LEFT == key || VB_KEY_RIGHT == key ||
VB_KEY_DOWN == key || VB_KEY_UP == key) {
/* Arrow keys = change localization */ /* Arrow keys = change localization */
uint32_t loc = 0; uint32_t loc = 0;
uint32_t count = 0; uint32_t count = 0;
@@ -476,7 +477,7 @@ VbError_t VbCheckDisplayKey(VbCommonParams* cparams, uint32_t key,
VbNvGet(vncptr, VBNV_LOCALIZATION_INDEX, &loc); VbNvGet(vncptr, VBNV_LOCALIZATION_INDEX, &loc);
if (VBERROR_SUCCESS != VbGetLocalizationCount(cparams, &count)) if (VBERROR_SUCCESS != VbGetLocalizationCount(cparams, &count))
loc = 0; /* No localization count (bad GBB?), so set to 0 (default) */ loc = 0; /* No localization count (bad GBB?), so set to 0 (default) */
else if (VB_KEY_RIGHT == key) else if (VB_KEY_RIGHT == key || VB_KEY_UP == key)
loc = (loc < count - 1 ? loc + 1 : 0); loc = (loc < count - 1 ? loc + 1 : 0);
else else
loc = (loc > 0 ? loc - 1 : count - 1); loc = (loc > 0 ? loc - 1 : count - 1);