Index: trunk/i386/boot2/gui.c =================================================================== --- trunk/i386/boot2/gui.c (revision 939) +++ trunk/i386/boot2/gui.c (revision 940) @@ -142,10 +142,9 @@ extern MenuItem *menuItems; -char prompt[BOOT_STRING_LEN]; +//char prompt[BOOT_STRING_LEN]; +extern char gBootArgs[BOOT_STRING_LEN]; -int prompt_pos=0; - char prompt_text[] = "boot: "; menuitem_t infoMenuItems[] = @@ -911,8 +910,8 @@ void clearGraphicBootPrompt() { // clear text buffer - prompt[0] = '\0'; - prompt_pos=0; + //prompt[0] = '\0'; + //prompt_pos=0; if( gui.bootprompt.draw == true ) @@ -928,15 +927,6 @@ void updateGraphicBootPrompt(int key) { - if ( key == kBackspaceKey ) - prompt[--prompt_pos] = '\0'; - else - { - prompt[prompt_pos] = key; - prompt_pos++; - prompt[prompt_pos] = '\0'; - } - fillPixmapWithColor( gui.bootprompt.pixmap, gui.bootprompt.bgcolor); makeRoundedCorners( gui.bootprompt.pixmap); @@ -950,12 +940,12 @@ position_t p_prompt = pos( p_text.x + ( ( strlen(prompt_text) ) * font_console.chars[0]->width ), p_text.y ); // calculate the position of the cursor - int offset = ( prompt_pos - ( ( gui.bootprompt.width / font_console.chars[0]->width ) - strlen(prompt_text) - 2 ) ); + int offset = ( strlen(gBootArgs) - ( ( gui.bootprompt.width / font_console.chars[0]->width ) - strlen(prompt_text) - 2 ) ); if ( offset < 0) offset = 0; - drawStr( prompt+offset, &font_console, gui.bootprompt.pixmap, p_prompt); + drawStr( gBootArgs, &font_console, gui.bootprompt.pixmap, p_prompt); gui.menu.draw = false; gui.bootprompt.draw = true; Index: trunk/i386/boot2/options.c =================================================================== --- trunk/i386/boot2/options.c (revision 939) +++ trunk/i386/boot2/options.c (revision 940) @@ -172,7 +172,7 @@ //========================================================================== -static char gBootArgs[BOOT_STRING_LEN]; +char gBootArgs[BOOT_STRING_LEN]; static char * gBootArgsPtr = gBootArgs; static char * gBootArgsEnd = gBootArgs + BOOT_STRING_LEN - 1; static char booterCommand[BOOT_STRING_LEN]; @@ -206,11 +206,11 @@ extern char bootRescanPrompt[]; if( bootArgs->Video.v_display == VGA_TEXT_MODE ) { - changeCursor( 0, row, kCursorTypeUnderline, 0 ); - clearScreenRows( row, kScreenLastRow ); + changeCursor( strlen(gBootArgs), row, kCursorTypeUnderline, 0 ); + //clearScreenRows( row, kScreenLastRow ); } - clearBootArgs(); + //clearBootArgs(); if (visible) { if (bootArgs->Video.v_display == VGA_TEXT_MODE) { @@ -218,11 +218,12 @@ printf( bootRescanPrompt ); } else { printf( bootPrompt ); + printf( gBootArgs ); } } } else { if (bootArgs->Video.v_display == GRAPHICS_MODE) { - clearGraphicBootPrompt(); +// clearGraphicBootPrompt(); } else { printf("Press Enter to start up the foreign OS. "); } @@ -252,22 +253,25 @@ { setCursorPosition( x, y, 0 ); putca(' ', 0x07, 1); - } else - updateGraphicBootPrompt(kBackspaceKey); - - *gBootArgsPtr-- = '\0'; - } + } + + *gBootArgsPtr-- = '\0'; + updateGraphicBootPrompt(kBackspaceKey); + } + else + { + *gBootArgsPtr = '\0'; + if( bootArgs->Video.v_display == VGA_TEXT_MODE ) putca(' ', 0x07, 1); + updateGraphicBootPrompt(kBackspaceKey); + } break; default: if ( key >= ' ' && gBootArgsPtr < gBootArgsEnd) { - if( bootArgs->Video.v_display == VGA_TEXT_MODE ) - putchar(key); // echo to screen - else - updateGraphicBootPrompt(key); - *gBootArgsPtr++ = key; + *gBootArgsPtr++ = key; + updateGraphicBootPrompt(key); } break;