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 }
bool DISNEY_ShouldInit() { Section_prop *sec = (Section_prop*)control->GetSection("speaker"); return sec->Get_bool("disney"); }
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); }