Esempio n. 1
0
void MENU_Check_Drive(HMENU handle, int cdrom, int floppy, int local, int image, int automount, int umount, char drive) {
#if !defined(HX_DOS)
	std::string full_drive(1, drive);
	Section_prop * sec = static_cast<Section_prop *>(control->GetSection("dos"));
	full_drive += ":\\";
	EnableMenuItem(handle, cdrom, (Drives[drive - 'A'] || menu.boot) ? MF_GRAYED : MF_ENABLED);
	EnableMenuItem(handle, floppy, (Drives[drive - 'A'] || menu.boot) ? MF_GRAYED : MF_ENABLED);
	EnableMenuItem(handle, local, (Drives[drive - 'A'] || menu.boot) ? MF_GRAYED : MF_ENABLED);
	EnableMenuItem(handle, image, (Drives[drive - 'A'] || menu.boot) ? MF_GRAYED : MF_ENABLED);
	if(sec) EnableMenuItem(handle, automount, AUTOMOUNT(full_drive.c_str(), drive) && !menu.boot && sec->Get_bool("automount") ? MF_ENABLED : MF_GRAYED);
	EnableMenuItem(handle, umount, (!Drives[drive - 'A']) || menu.boot ? MF_GRAYED : MF_ENABLED);
#endif
}
Esempio n. 2
0
bool DISNEY_ShouldInit() {
	Section_prop *sec = (Section_prop*)control->GetSection("speaker");
	return sec->Get_bool("disney");
}
Esempio n. 3
0
bool MENU_SetBool(std::string secname, std::string value) {
	Section_prop * sec = static_cast<Section_prop *>(control->GetSection(secname));
	if(sec) SetVal(secname, value, sec->Get_bool(value) ? "false" : "true");
	return sec->Get_bool(value);
}