Index: trunk/i386/boot2/graphics.c =================================================================== --- trunk/i386/boot2/graphics.c (revision 307) +++ trunk/i386/boot2/graphics.c (revision 308) @@ -36,6 +36,8 @@ * for spinning disk */ static int currentIndicator = 0; +static int oldScreenWidth = 0; +static int oldScreenHeight = 0; int previewTotalSectors = 0; int previewLoadedSectors = 0; @@ -1127,7 +1129,10 @@ params[1] = 25; } - setVESATextMode( params[0], params[1], 4 ); + if (params[0] != oldScreenWidth && params[1] != oldScreenHeight) + { + setVESATextMode( params[0], params[1], 4 ); + } bootArgs->Video.v_display = VGA_TEXT_MODE; } Index: trunk/i386/boot2/gui.c =================================================================== --- trunk/i386/boot2/gui.c (revision 307) +++ trunk/i386/boot2/gui.c (revision 308) @@ -1786,6 +1786,7 @@ int pos; int length; const char *dummyVal; + int oldScreenWidth, oldScreenHeight; bool legacy_logo; uint16_t x, y; @@ -1807,16 +1808,23 @@ screen_params[1] = DEFAULT_SCREEN_HEIGHT; } + // Save current screen resolution. + oldScreenWidth = gui.screen.width; + oldScreenHeight = gui.screen.height; + gui.screen.width = screen_params[0]; gui.screen.height = screen_params[1]; // find best matching vesa mode for our requested width & height getGraphicModeParams(screen_params); - if (bootArgs->Video.v_display == VGA_TEXT_MODE) { + // Set graphics mode if the booter was in text mode or the screen resolution has changed. + if (bootArgs->Video.v_display == VGA_TEXT_MODE + || (screen_params[0] != oldScreenWidth && screen_params[1] != oldScreenHeight) ) + { setVideoMode(GRAPHICS_MODE, 0); } - + if (getValueForKey("-checkers", &dummyVal, &length, &bootInfo->bootConfig)) { drawCheckerBoard(); } else {