Index: branches/azimutz/CleanCut/i386/libsaio/msdos.c =================================================================== --- branches/azimutz/CleanCut/i386/libsaio/msdos.c (revision 311) +++ branches/azimutz/CleanCut/i386/libsaio/msdos.c (revision 312) @@ -75,7 +75,6 @@ static CICell msdoscurrent = 0; static int msdosrootcluster = 0; static int msdosfatbits = 0; -static int msdosCacheBlockSize = 0; #if UNUSED /* @@ -153,7 +152,7 @@ if (msdoscurrent == ih) { - CacheInit(ih, msdosCacheBlockSize); + CacheInit(ih, msdosclustersize); return 0; } @@ -224,8 +223,7 @@ msdosclustersize = msdosbps * spc; msdoscurrent = ih; - msdosCacheBlockSize = (msdosclustersize > MAX_CACHE_BLOCKSIZE) ? msdosclustersize : MAX_CACHE_BLOCKSIZE; - CacheInit(ih, msdosCacheBlockSize); + CacheInit(ih, msdosclustersize); free (buf); return 0; } @@ -233,12 +231,12 @@ static int readSectorAligned(CICell ih, off_t readOffset, char *buf, int size) { - long long sectorOffset = (uint64_t)readOffset / msdosCacheBlockSize * msdosCacheBlockSize; - long relOffset = readOffset % msdosCacheBlockSize; + long long sectorOffset = (uint64_t)readOffset / msdosclustersize * msdosclustersize; + long relOffset = readOffset % msdosclustersize; char *cacheBuffer; - cacheBuffer = malloc(msdosCacheBlockSize); - CacheRead(ih, cacheBuffer, sectorOffset, msdosCacheBlockSize, true); + cacheBuffer = malloc(msdosclustersize); + CacheRead(ih, cacheBuffer, sectorOffset, msdosclustersize, true); bcopy(cacheBuffer + relOffset, buf, size); free(cacheBuffer); Index: branches/azimutz/CleanCut/i386/boot2/graphics.c =================================================================== --- branches/azimutz/CleanCut/i386/boot2/graphics.c (revision 311) +++ branches/azimutz/CleanCut/i386/boot2/graphics.c (revision 312) @@ -1127,7 +1127,7 @@ params[1] = 25; } - setVESATextMode( params[0], params[1], 4 ); + setVESATextMode( params[0], params[1], 4 ); bootArgs->Video.v_display = VGA_TEXT_MODE; } Index: branches/azimutz/CleanCut/i386/boot2/gui.c =================================================================== --- branches/azimutz/CleanCut/i386/boot2/gui.c (revision 311) +++ branches/azimutz/CleanCut/i386/boot2/gui.c (revision 312) @@ -754,8 +754,12 @@ } } - // Use the next (device_*_o) image for the selected item. - if (isSelected) devicetype++; + // Draw the selection image and use the next (device_*_o) image for the selected item. + if (isSelected) + { + blend(images[iSelection].image, buffer, centeredAt(images[iSelection].image, p)); + devicetype++; + } // draw icon blend( images[devicetype].image, buffer, centeredAt( images[devicetype].image, p )); @@ -827,8 +831,6 @@ if(gui.menu.draw) drawInfoMenuItems(); - blend( images[iSelection].image, gui.devicelist.pixmap, centeredAt( images[iSelection].image, p ) ); - #if DEBUG gui.debug.cursor = pos( 10, 100); dprintf( &gui.screen, "label %s\n", param->label ); @@ -1784,6 +1786,7 @@ int pos; int length; const char *dummyVal; + int oldScreenWidth, oldScreenHeight; bool legacy_logo; uint16_t x, y; @@ -1805,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 { Index: branches/azimutz/CleanCut/i386/boot2/options.c =================================================================== --- branches/azimutz/CleanCut/i386/boot2/options.c (revision 311) +++ branches/azimutz/CleanCut/i386/boot2/options.c (revision 312) @@ -112,7 +112,7 @@ char dummy[80]; getBootVolumeDescription( gBootVolume, dummy, 80, true ); - drawDeviceIcon( gBootVolume, gui.screen.pixmap, p, false ); + drawDeviceIcon( gBootVolume, gui.screen.pixmap, p, true ); drawStrCenteredAt( (char *) msg, &font_small, gui.screen.pixmap, gui.countdown.pos ); // make this screen the new background