Ticket #1482: 1482.diff

File 1482.diff, 790 bytes (added by maxime.simon, 16 years ago)

First item of the menu selected by default.

  • src/system/boot/platform/generic/text_menu.cpp

     
    352352    int32 selected;
    353353    MenuItem *item = menu->FindSelected(&selected);
    354354    if (item == NULL) {
    355         selected = menu->CountItems() - 1;
     355        selected = 0;
    356356        item = menu->ItemAt(selected);
    357357        if (item != NULL)
    358358            item->Select(true);
     
    414414        } else if (key == TEXT_CONSOLE_KEY_RETURN
    415415            || key == TEXT_CONSOLE_KEY_SPACE) {
    416416            // leave the menu
    417             if (item->Submenu() != NULL) {
     417            if (item->Submenu() != NULL && key == TEXT_CONSOLE_KEY_RETURN) {
    418418                int32 offset = sMenuOffset;
    419419                menu->Hide();
    420420