Chameleon

Chameleon Commit Details

Date:2010-09-21 03:29:04 (13 years 7 months ago)
Author:Evan Lojewski
Commit:533
Parents: 532
Message:GUI module should now work in the four main cases (combo of embededtheme and /Extra/Themes). Only tested on my machines.
Changes:
M/branches/meklort/i386/modules/GUI/GUI_module.c
M/branches/meklort/i386/boot2/boot.c
M/branches/meklort/i386/modules/GUI/gui.c

File differences

branches/meklort/i386/boot2/boot.c
294294
295295
296296
297
298
299
300
301
302
303
304
305
306
307
308
309
297310
298311
312
299313
314
300315
301316
302317
......
322337
323338
324339
325
326
327
328
340
329341
330
331
332
333
334
335
336342
337
338
339343
340344
341345
firstRun = false;
}
// Enable touching a single BIOS device only if "Scan Single Drive"=y is set in system config.
if (getBoolForKey(kScanSingleDriveKey, &gScanSingleDrive, &bootInfo->bootConfig) && gScanSingleDrive) {
gScanSingleDrive = true;
}
// Create a list of partitions on device(s).
if (gScanSingleDrive) {
scanBootVolumes(gBIOSDev, &bvCount);
} else {
scanDisks(gBIOSDev, &bvCount);
}
// Create a separated bvr chain using the specified filters.
bvChain = newFilteredBVChain(0x80, 0xFF, allowBVFlags, denyBVFlags, &gDeviceCount);
gBootVolume = selectBootVolume(bvChain);
// Intialize module system
if(init_module_system())
{
gEnableCDROMRescan = promptForRescanOption();
}
// Enable touching a single BIOS device only if "Scan Single Drive"=y is set in system config.
if (getBoolForKey(kScanSingleDriveKey, &gScanSingleDrive, &bootInfo->bootConfig) && gScanSingleDrive) {
gScanSingleDrive = true;
}
// Create a list of partitions on device(s).
if (gScanSingleDrive) {
scanBootVolumes(gBIOSDev, &bvCount);
} else {
scanDisks(gBIOSDev, &bvCount);
}
gBootVolume = selectBootVolume(bvChain);
#if DEBUG
printf(" Default: %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBootVolume, gBootVolume->biosdev, gBootVolume->part_no, gBootVolume->flags);
printf(" bt(0,0): %d, ->biosdev: %d, ->part_no: %d ->flags: %d\n", gBIOSBootVolume, gBIOSBootVolume->biosdev, gBIOSBootVolume->part_no, gBIOSBootVolume->flags);
branches/meklort/i386/modules/GUI/gui.c
299299
300300
301301
302
302303
303304
304305
305306
306307
307308
309
308310
309311
310312
......
693695
694696
695697
698
696699
697700
698701
return 1;
}
}
return 1;
}
static int loadGraphics(void)
{
LOADPNG(background, IMG_REQUIRED);
LOADPNG(logo, IMG_REQUIRED);
LOADPNG(device_generic, IMG_REQUIRED);
if ((strlen(theme_name) + 27) > sizeof(dirspec)) {
return 1;
}
sprintf(dirspec, "/Extra/Themes/%s/theme.plist", theme_name);
if (loadConfigFile(dirspec, &bootInfo->themeConfig) != 0) {
#ifdef EMBED_THEME
branches/meklort/i386/modules/GUI/GUI_module.c
8686
8787
8888
89
90
91
92
93
94
95
96
97
9889
9990
10091
......
10697
10798
10899
100
101
102
103
104
105
106
107
108
109
110
111
109112
110113
111114
112
115
116
113117
114118
115119
**/
void GUI_start()
{
replace_function("_initGraphicsMode", &GUI_initGraphicsMode);
replace_function("_getBootOptions", &GUI_getBootOptions);
replace_function("_clearBootArgs", &GUI_clearBootArgs);
replace_function("_showHelp", &GUI_showHelp);
replace_function("_printf", &GUI_printf);
replace_function("_verbose", &GUI_verbose);
replace_function("_error", &GUI_error);
replace_function("_stop", &GUI_stop);
// Start the gui
// initGUI() returned with an error, disabling GUI.
useGUI = false;
}
else
{
replace_function("_initGraphicsMode", &GUI_initGraphicsMode);
replace_function("_getBootOptions", &GUI_getBootOptions);
replace_function("_clearBootArgs", &GUI_clearBootArgs);
replace_function("_showHelp", &GUI_showHelp);
replace_function("_printf", &GUI_printf);
replace_function("_verbose", &GUI_verbose);
replace_function("_error", &GUI_error);
replace_function("_stop", &GUI_stop);
}
// Hoot for the boot screen
register_hook_callback("Kernel Start", &GUI_Kernel_Start_hook);
register_hook_callback("PreBoot", &GUI_PreBoot_hook);
register_hook_callback("PreBoot", &GUI_PreBoot_hook);
}
/**

Archive Download the corresponding diff file

Revision: 533