Index: branches/diebuche/i386/libsaio/dsdt_patcher.c =================================================================== --- branches/diebuche/i386/libsaio/dsdt_patcher.c (revision 129) +++ branches/diebuche/i386/libsaio/dsdt_patcher.c (revision 130) @@ -72,7 +72,7 @@ } return NULL; } -/** The folowing ACPI Table search algo. should be reused anywhere needed:*/ +/* The following ACPI Table search algo. should be reused anywhere needed:*/ int search_and_get_acpi_fd(const char * filename, const char ** outDirspec) { int fd=0; @@ -81,7 +81,7 @@ static bool first_time =true; int len=0; - /// Take in accound user overriding if it's DSDT only + // Take in accound user overriding if it's DSDT only if (strstr(filename, "DSDT") && getValueForKey(kDSDT, &overriden_pathname, &len, &bootInfo->bootConfig)) Index: branches/diebuche/i386/boot2/boot.c =================================================================== --- branches/diebuche/i386/boot2/boot.c (revision 129) +++ branches/diebuche/i386/boot2/boot.c (revision 130) @@ -167,7 +167,7 @@ sleep(kBootErrorTimeout); } - //if the vbios patch have been applied retore it before performing fake efi stuff + //if the vbios patch have been applied restore it before performing fake efi stuff if (autoResolution == TRUE) { unlock_vbios(map); restore_vbios(map); @@ -402,13 +402,7 @@ verbose("Patched resolution mode to %dx%d.\n", params[0], params[1]); } } - - - - - - - + if (useGUI) { /* XXX AsereBLN handle error */ initGUI(); Index: branches/diebuche/i386/boot2/boot.h =================================================================== --- branches/diebuche/i386/boot2/boot.h (revision 129) +++ branches/diebuche/i386/boot2/boot.h (revision 130) @@ -56,7 +56,6 @@ #define kInsantMenuKey "Instant Menu" #define kDefaultKernel "mach_kernel" #define kGUIKey "GUI" -#define kAutoResolutionKey "AutoResolution" #define kBootBannerKey "Boot Banner" #define kWaitForKeypressKey "Wait" /* AsereBLN: added the other keys */ @@ -89,6 +88,7 @@ #define kRenamePartition "Rename Partition" /* disk.c */ #define kUseMemDetect "UseMemDetect" /* platform.c */ #define kRestartFix "RestartFix" /* dsdt_patcher.c */ +#define kAutoResolutionKey "AutoResolution" /* Azi: not present on lebibou diff */ /* * Flags to the booter or kernel Index: branches/diebuche/i386/boot2/gui.c =================================================================== --- branches/diebuche/i386/boot2/gui.c (revision 129) +++ branches/diebuche/i386/boot2/gui.c (revision 130) @@ -557,7 +557,7 @@ int initGUI(void) { - //int val; + int val; #ifdef EMBED_THEME config_file_t *config; @@ -579,12 +579,30 @@ } #endif // parse display size parameters - /*if (getIntForKey("screen_width", &val, &bootInfo->themeConfig)) { - screen_params[0] = val; - } - if (getIntForKey("screen_height", &val, &bootInfo->themeConfig)) { - screen_params[1] = val; - }*/ + if (autoResolution == TRUE) { + VBEModeInfoBlock minfo; + unsigned short mode_n; + unsigned short vesaVersion; + + mode_n = getVESAModeWithProperties( screen_params[0], screen_params[1], 32, maColorModeBit | + maModeIsSupportedBit | + maGraphicsModeBit | + maLinearFrameBufferAvailBit, + 0, + &minfo, &vesaVersion ); + } else { + // parse screen size parameters + if(getIntForKey("screen_width", &val, &bootInfo->themeConfig)) + screen_params[0] = val; + else + screen_params[0] = DEFAULT_SCREEN_WIDTH; + + if(getIntForKey("screen_height", &val, &bootInfo->themeConfig)) + screen_params[1] = val; + else + screen_params[1] = DEFAULT_SCREEN_HEIGHT; + } + screen_params[2] = 32; // Initalizing GUI strucutre. @@ -1698,7 +1716,7 @@ loadBootGraphics(); } - if (autoResolution = TRUE) { + if (autoResolution == TRUE) { VBEModeInfoBlock minfo; unsigned short mode_n; unsigned short vesaVersion; Index: branches/diebuche/i386/boot2/options.c =================================================================== --- branches/diebuche/i386/boot2/options.c (revision 129) +++ branches/diebuche/i386/boot2/options.c (revision 130) @@ -1179,7 +1179,7 @@ // Load com.apple.Boot.plist from the selected volume // and use its contents to override default bootConfig. - // This is not a mandatory opeartion anymore. + // This is not a mandatory operation anymore. loadOverrideConfig(&bootInfo->overrideConfig);