Chameleon

Chameleon Commit Details

Date:2015-07-23 04:46:04 (8 years 9 months ago)
Author:ErmaC
Commit:2738
Parents: 2737
Message:The "Legacy Logo" is now enabled by default.
Changes:
M/trunk/doc/BootHelp.txt
M/trunk/i386/boot2/graphics.c
M/trunk/i386/boot2/gui.c

File differences

trunk/i386/boot2/graphics.c
397397
398398
399399
400
400
401401
402402
403403
......
859859
860860
861861
862
862
863863
864864
865
865866
867
866868
867869
868870
869871
872
870873
871874
872875
......
927930
928931
929932
930
933
931934
932935
933936
934937
935
938
936939
937940
938941
//==========================================================================
// Simple decompressor for boot images encoded in RLE format.
char * decodeRLE( const void * rleData, int rleBlocks, int outBytes )
char *decodeRLE( const void *rleData, int rleBlocks, int outBytes )
{
char *out, *cp;
unsigned short y,
unsigned short width,
unsigned short height,
unsigned char * data )
unsigned char *data )
{
unsigned short drawWidth;
long pixelBytes = VIDEO(depth) / 8;
unsigned char * vram = (unsigned char *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + pixelBytes * x;
drawWidth = MIN(width, VIDEO(width) - x);
height = MIN(height, VIDEO(height) - y);
while ( height-- )
{
bcopy( data, vram, drawWidth * pixelBytes );
void drawPreview(void *src, uint8_t * saveunder)
{
uint8_t * screen;
uint8_t *screen;
uint32_t rowBytes, pixelShift;
uint32_t x, y;
int32_t blob;
uint32_t alpha, in, color, result;
uint8_t * out;
uint8_t *out;
void *uncomp;
int origwidth, origheight, origbpx;
uint32_t saveindex[kIOHibernateProgressCount] = { 0 };
trunk/i386/boot2/gui.c
13031303
13041304
13051305
1306
1307
1306
13081307
13091308
13101309
......
13841383
13851384
13861385
1387
1388
1386
1387
13891388
13901389
13911390
13921391
1393
1394
1392
13951393
13961394
13971395
......
22942292
22952293
22962294
2297
2298
2299
2295
2296
2297
23002298
23012299
23022300
......
23312329
23322330
23332331
2334
2335
2336
2337
2332
2333
2334
2335
2336
2337
23382338
23392339
23402340
......
23982398
23992399
24002400
2401
2402
2403
2404
2401
2402
2403
2404
24052405
2406
2407
2406
2407
24082408
24092409
2410
2410
24112411
24122412
2413
2414
2413
2414
24152415
24162416
24172417
2418
2419
2418
2419
24202420
24212421
24222422
// ====================================================================
static inline
void vramwrite (void *data, int width, int height)
static inline void vramwrite (void *data, int width, int height)
{
if (VIDEO (depth) == 32 && VIDEO (rowBytes) == gui.backbuffer->width * 4)
{
struct putc_info //Azi: exists on console.c & printf.c
{
char * str;
char * last_str;
char *str;
char *last_str;
};
// ====================================================================
static int
sputc(int c, struct putc_info * pi) //Azi: same as above
static int sputc(int c, struct putc_info * pi) //Azi: same as above
{
if (pi->last_str)
{
// ====================================================================
uint16_t bootImageWidth = 0;
uint16_t bootImageHeight = 0;
uint8_t *bootImageData = NULL;
uint16_t bootImageWidth = 0;
uint16_t bootImageHeight = 0;
uint8_t *bootImageData = NULL;
static bool usePngImage = true;
//==========================================================================
int length;
const char *dummyVal;
int oldScreenWidth, oldScreenHeight;
bool legacy_logo;
uint16_t x, y;
if (getBoolForKey("Legacy Logo", &legacy_logo, &bootInfo->chameleonConfig) && legacy_logo)
bool legacy_logo = true; // ErmaC: Legacy Logo is enabled by default
uint16_t x, y;
getBoolForKey("Legacy Logo", &legacy_logo, &bootInfo->chameleonConfig);
if ( legacy_logo )
{
usePngImage = false;
}
}
else
{
uint8_t *appleBootPict;
bootImageData = NULL;
bootImageWidth = kAppleBootWidth;
bootImageHeight = kAppleBootHeight;
uint8_t *appleBootPict;
bootImageData = NULL;
bootImageWidth = kAppleBootWidth;
bootImageHeight = kAppleBootHeight;
// Prepare the data for the default Apple boot image.
appleBootPict = (uint8_t *) decodeRLE(gAppleBootPictRLE, kAppleBootRLEBlocks, bootImageWidth * bootImageHeight);
// Prepare the data for the default Apple boot image.
appleBootPict = (uint8_t *) decodeRLE(gAppleBootPictRLE, kAppleBootRLEBlocks, bootImageWidth * bootImageHeight);
if (appleBootPict)
{
convertImage(bootImageWidth, bootImageHeight, appleBootPict, &bootImageData);
convertImage(bootImageWidth, bootImageHeight, appleBootPict, &bootImageData);
if (bootImageData)
{
x = (screen_params[0] - MIN(kAppleBootWidth, screen_params[0])) / 2;
y = (screen_params[1] - MIN(kAppleBootHeight, screen_params[1])) / 2;
x = (screen_params[0] - MIN(kAppleBootWidth, screen_params[0])) / 2;
y = (screen_params[1] - MIN(kAppleBootHeight, screen_params[1])) / 2;
drawDataRectangle(x, y, kAppleBootWidth, kAppleBootHeight, bootImageData);
free(bootImageData);
}
free(appleBootPict);
}
free(appleBootPict);
}
}
}
// ====================================================================
trunk/doc/BootHelp.txt
6868
6969
7070
71
71
7272
7373
7474
"Boot Banner"=Yes|No Show boot banner in GUI mode (disabled by default).
ShowInfo=No Disables display of partition and resolution details.
"Boot Banner"=No will also disable this info.
"Legacy Logo"=Yes|No Use the legacy grey apple logo (disabled by default).
"Legacy Logo"=Yes|No Use the legacy grey apple logo (enabled by default).
PciRoot=<value> Use an alternate value for PciRoot (default value 0).

Archive Download the corresponding diff file

Revision: 2738