Chameleon

Chameleon Commit Details

Date:2010-07-15 22:24:44 (13 years 9 months ago)
Author:blackosx
Commit:180
Parents: 179
Message:Revised the rollover theme functionality as it was drawing both the normal device image as well as the rollover image. Added Conti's fix for overcoming potential deadbeef error due to invalid specified resolution.
Changes:
M/branches/blackosx/version
M/branches/blackosx/CHANGES
M/branches/blackosx/i386/boot2/gui.c

File differences

branches/blackosx/version
1
1
2.0-RC5 (blackosx_GUI_edit)
2.0-RC5 (blackosx_GUI_editv2)
branches/blackosx/CHANGES
1
2
3
4
15
26
37
- Revised the rollover theme functionality as it was drawing both the normal device image as well as the rollover image.
- Added Conti's fix for overcoming a potential fail with deadbeef error due to a non standard specified resolution, or in my case of testing - on an empty value for the screen_width / screen_height in a theme.plist.
- Added rollover theme functionality while retaining compatibility with existing themes. Note: Compiling with an embedded theme currently fails as I haven't added _o.pngs in to artwork folder. But then if I do, the filesize will exceed the limit.
- Implemented SPD memory automatic detection and injection,seems to work really great ...
- Factorized code to prepare a dynamic memory detection algorithm ...
- Optimized smbios table address search
branches/blackosx/i386/boot2/gui.c
623623
624624
625625
626
627
628
629
630
631
632
633
634
635
636
626637
627638
628639
......
793804
794805
795806
796
797
798
807
808
809
810
811
812
799813
800814
801815
......
17411755
17421756
17431757
1758
1759
1760
17441761
17451762
1746
1747
17481763
17491764
17501765
1751
1766
1767
1768
1769
1770
17521771
17531772
1754
1773
1774
17551775
17561776
17571777
}
screen_params[2] = 32;
// blackosx - This solved an issue when the theme.plist had blank values for screen_height and screen_width.
// Thanks to Al Schar for pointing out Conti's fix and thanks to Conti for the fix.
/* Fix for "Memory allocation error! Addr=0xdeadbeef, Size=0x0" - if no VESA resolution defined in com.apple.Boot.plist */
if(!screen_params[0]) {
screen_params[0] = DEFAULT_SCREEN_WIDTH;
screen_params[1] = DEFAULT_SCREEN_HEIGHT;
}
/* End Fix ~ Conti */
// Initalizing GUI strucutre.
bzero(&gui, sizeof(gui_t));
dprintf( &gui.screen, "modtime %d\n", param->modTime );
#endif
}
drawDeviceIcon( param, gui.devicelist.pixmap, p, false ); //blackosx - added false to draw normal icon if it's not selected.
else if (rolloverfail ==false)
drawDeviceIcon( param, gui.devicelist.pixmap, p, false ); //blackosx - draw non-highlighted normal device icon
if (rolloverfail == true) // blackosx - draw the device icon on top of the device_selection only if we're not using rollover image.
drawDeviceIcon( param, gui.devicelist.pixmap, p, false ); //blackosx - added false to draw normal icon if it's not selected.
if (gui.layout == HorizontalLayout)
{
p.x += images[iSelection].image->width + gui.devicelist.iconspacing;
}
// parse screen size parameters
// blackosx - Thanks to Al Schar for pointing out Conti's fix and thanks to Conti for the fix.
/* Fix for "Memory allocation error! Addr=0xdeadbeef, Size=0x0" - if no VESA resolution defined in com.apple.Boot.plist */
if (getIntForKey("boot_width", &pos, &bootInfo->themeConfig)) {
screen_params[0] = pos;
} else {
screen_params[0] = DEFAULT_SCREEN_WIDTH;
}
if (getIntForKey("boot_height", &pos, &bootInfo->themeConfig)) {
screen_params[1] = pos;
} else {
}
screen_params[2] = 32;
if(!screen_params[0]) {
screen_params[0] = DEFAULT_SCREEN_WIDTH;
screen_params[1] = DEFAULT_SCREEN_HEIGHT;
}
screen_params[2] = 32;
/* End Fix ~ Conti */
gui.screen.width = screen_params[0];
gui.screen.height = screen_params[1];

Archive Download the corresponding diff file

Revision: 180